如何在Rails 3中创建生产数据库并为其加载模式?Rails 3.创建生产数据库
我尝试以下方法...
一
rake db:create Rails.env='production' && rake db:schema:load Rails.env='production'
II。
# config/environment.rb
# Set the rails environment
Rails.env='production'
rake db:create && rake db:schema:load
...但它们都不起作用。
谢谢。
的Debian GNU/Linux的5.0.6;
Rails 3.0.0;
sqlite3 3.7.2。
它应该是分贝:模式:负载 – AMing 2011-06-27 07:07:08
刚注意你不要销毁现有的数据库。如果你的模式有force => true,你可能会在糟糕的一天 – 2015-03-24 14:08:23