Rails 3. Creating a production database

前端 未结 2 468
闹比i
闹比i 2020-12-04 10:03

How can I create a production database in Rails 3 and load a schema to it?

I tried the following approaches...

I.

rake db:create Rails.env=\'         


        
相关标签:
2条回答
  • 2020-12-04 10:44

    Shouldn't this be

    RAILS_ENV=production bundle exec rake db:create db:schema:load
    
    0 讨论(0)
  • 2020-12-04 11:08

    You can set the rails env off of the environment variable RAILS_ENV

    RAILS_ENV=production bundle exec rake db:create db:schema:load
    

    should work

    0 讨论(0)
提交回复
热议问题