Passenger Version : 4.0.5Ruby: ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-linux]Rails: Rails 4.0.0I have created a new application. It works fine in development mode using Passenger, but throws the errordatabase configuration does not specify adapter (ActiveRecord::AdapterNotSpecified)
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/activerecord-4.0.0/lib/active_record/connection_adapters/connection_specification.rb:52:in `resolve_hash_connection'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/activerecord-4.0.0/lib/active_record/connection_adapters/connection_specification.rb:46:in `resolve_string_connection'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/activerecord-4.0.0/lib/active_record/connection_adapters/connection_specification.rb:30:in `spec'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/activerecord-4.0.0/lib/active_record/connection_handling.rb:39:in `establish_connection'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/activerecord-4.0.0/lib/active_record/railtie.rb:175:in `block (2 levels) in <class:Railtie>'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:44:in `each'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/activerecord-4.0.0/lib/active_record/base.rb:322:in `<module:ActiveRecord>'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/activerecord-4.0.0/lib/active_record/base.rb:22:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/passenger-4.0.5/lib/phusion_passenger/loader_shared_helpers.rb:295:in `before_handling_requests'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/passenger-4.0.5/helper-scripts/rack-preloader.rb:105:in `negotiate_spawn_command'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/passenger-4.0.5/helper-scripts/rack-preloader.rb:129:in `<module:App>'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/passenger-4.0.5/helper-scripts/rack-preloader.rb:6:in `<module:PhusionPassenger>'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/passenger-4.0.5/helper-scripts/rack-preloader.rb:5:in `<main>'when running in Production mode..But application works fine in WEBrick server in both development and productionMy production and development config are exactly same.
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8
database: mysample
pool: 5
username: mysample
password: mysample
socket: /var/run/mysqld/mysqld.sock
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: mysql2
encoding: utf8
database: mysample
pool: 5
username: mysample
password: mysample
socket: /var/run/mysqld/mysqld.sock
production:
adapter: mysql2
encoding: utf8
database: mysample
pool: 5
username: mysample
password: mysample
socket: /var/run/mysqld/mysqld.sock
Any pointers?