捆绑exec on procution faild和application.rb加载错误

时间:2016-11-22 05:33:42

标签: ruby-on-rails ruby-on-rails-5

将我的rails应用程序移至生产中。我需要执行以下命令

bundle exec rake assets:precompile db:migrate RAILS_ENV=production

执行此命令时,出现以下加载错误

rake aborted!
LoadError: cannot load such file -- /home/ubuntu/api/config/application
/home/ubuntu/api/Rakefile:4:in `require_relative'
/home/ubuntu/api/Rakefile:4:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
/home/ubuntu/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)

我使用rails 5创建了一个应用程序。如何将rails应用程序转移到生产

1 个答案:

答案 0 :(得分:1)

您需要在命令之前传递numberOfWindows并打破命令

RAILS_ENV