I’m trying to upload my Rails 3 application to real production environment. (The application works perfectly on my local machine).
When I run rails c I got the following error:
/home/misha_moroshko/.gems/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:62:in `establish_connection': development database is not configured (ActiveRecord::AdapterNotSpecified)
from /home/misha_moroshko/.gems/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:55:in `establish_connection'
from /home/misha_moroshko/.gems/gems/activerecord-3.0.1/lib/active_record/railtie.rb:59
from /home/misha_moroshko/.gems/gems/activesupport-3.0.1/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
How should I tell Rails that it should work with the production database rather than the development one ?
Set the RAILS_ENV environment variable first, or pass it to the rails c command:
OR