ruby on rails - Elastic Beanstalk Deploying Issue - Production Database Is Not Configured -


i having issues deploying rails api elastic beanstalk. cannot seem rid of following error: activerecord::adapternotspecified: 'production' database not configured. available: ["development", "test"]

please me figure out. attaching details below.

/config/database.yml

default: &defaults adapter: postgresql encoding: unicode min_messages: warning pool: 5 timeout: 10000 username: postgres host: localhost production: <<: *defaults adapter: postgresql encoding: unicode database: <%= env['rds_db_name'] %> username: <%= env['rds_username'] %> password: <%= env['rds_password'] %> host: <%= env['rds_hostname'] %> port: <%= env['rds_port'] %> pool: 5

/config/environments/production.rb

config.assets.compile = false

config.assets.initialize_on_precompile = false

eb logs

[instance: i-13bf48db] command failed on instance. return code: 1 output: (truncated)...ib/rails/application.rb:389:in `block in run_tasks_blocks' /home/rof/cache/bundler/ruby/2.1.0/gems/sprockets-rails-2.3.1/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define' tasks: top => environment (see full trace running task --trace). hook /opt/elasticbeanstalk/hooks/appdeploy/pre/11_asset_compilation.sh failed. more detail, check /var/log/eb-activity.log using console or eb cli.

and

+++ ruby_version=2.1.5 +++ export gem_root=/opt/rubies/ruby-2.1.5/lib/ruby/gems/2.1.0 +++ gem_root=/opt/rubies/ruby-2.1.5/lib/ruby/gems/2.1.0 ++ (( 0 != 0 )) + cd /var/app/ondeck + su -s /bin/bash -c 'bundle exec /opt/elasticbeanstalk/support/scripts/check-for-rake-task.rb assets:precompile' webapp + '[' false == true ']' + su -s /bin/bash -c 'bundle exec rake assets:precompile' webapp rake aborted! activerecord::adapternotspecified: 'production' database not configured. available: ["development", "test"] /home/rof/cache/bundler/ruby/2.1.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/connection_specification.rb:257:in `resolve_symbol_connection'

if not in .gitignore, please give credentials in database.yml environment want do.


Comments

  1. Your blog is in a convincing manner, thanks for sharing such an information with lots of your effort and time
    ruby on rails training India
    ruby on rails training Hyderabad

    ReplyDelete

Post a Comment

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

go - Idiomatic way to handle template errors in golang -