1

I am trying to add columns to my Rails app in production environment. Can't do it in development environment on my local machine because of installation problem on some bundles.

I ran this:

sudo ruby script/generate migration add_provider_to_spots provider:string provider_price:string provider_ref:string RAILS_ENV=production

But this error pops up:

/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:62:in `establish_connection': development database is not configured (ActiveRecord::AdapterNotSpecified)
from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:55:in `establish_connection'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:438:in `initialize_database'
.
.
.

Any idea? Thanks.

1 Answer 1

2

Try it this way

sudo RAILS_ENV=production ruby script/generate migration add_provider_to_spots provider:string provider_price:string provider_ref:string
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.