开发者

Add columns to Rails database in production environment

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 installati开发者_StackOverflow中文版on 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.


Try it this way

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜