迁移到heroku

时间:2016-06-03 09:50:00

标签: ruby-on-rails heroku database-migration production-environment

当我尝试通过heroku run rake迁移到heroku时 我收到以下错误:

Running rake on ⬢ friends-clique... up, run.8185
/app/vendor/bundle/ruby/2.2.0/gems/bootstrap-4.0.0.alpha3/lib/bootstrap/version.rb:2: warning: already initialized constant Bootstrap::VERSION
/app/vendor/bundle/ruby/2.2.0/gems/bootstrap-sass-3.3.6/lib/bootstrap-sass/version.rb:2: warning: previous definition of VERSION was here
/app/vendor/bundle/ruby/2.2.0/gems/bootstrap-4.0.0.alpha3/lib/bootstrap/version.rb:3: warning: already initialized constant Bootstrap::BOOTSTRAP_SHA
/app/vendor/bundle/ruby/2.2.0/gems/bootstrap-sass-3.3.6/lib/bootstrap-sass/version.rb:3: warning: previous definition of BOOTSTRAP_SHA was here
DEPRECATION WARNING: The configuration option `config.serve_static_assets` has been renamed to `config.serve_static_files` to clarify its role (it merely enables serving everything in the `public` folder and is unrelated to the asset pipeline). The `serve_static_assets` alias will be removed in Rails 5.0. Please migrate your configuration files accordingly. (called from block in <top (required)> at /app/config/environments/production.rb:82)
Abort testing: Your Rails environment is running in production mode!

我以为heroku在生产模式下运行,刚刚发生了什么?

2 个答案:

答案 0 :(得分:0)

使用heroku迁移数据库的正确命令是

Heroku run rake db:migrate

这应该运行良好。

答案 1 :(得分:-2)

我认为您可以按照本指南解决问题official asset configuration for heroku