上限生产部署-Rails 6-失败

时间:2020-07-22 11:48:07

标签: ruby-on-rails ruby deployment capistrano ruby-on-rails-6

尝试将Rails 6应用程序部署到Digital Ocean Droplet。

我运行cap production deploy,但失败并出现以下错误:

(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Command::Failed: rake exit status: 256
rake stdout: Nothing written
rake stderr: rake aborted!
NoMethodError: undefined method `each' for #<String:0x0000565323a30eb8>
/var/www/html/Dev/rails/AppName/config/application.rb:10:in `<module:AppName>'
/var/www/html/Dev/rails/AppName/config/application.rb:9:in `<top (required)>'
/var/www/html/Dev/rails/AppName/Rakefile:4:in `require_relative'
/var/www/html/Dev/rails/AppName/Rakefile:4:in `<top (required)>'
/home/rdevc/.rbenv/versions/2.5.1/bin/bundle:23:in `load'
/home/rdevc/.rbenv/versions/2.5.1/bin/bundle:23:in `<main>'
(See full trace by running task with --trace)

Tasks: TOP => deploy:assets:prepare
(See full trace by running task with --trace)
The deploy has failed with an error: rake exit status: 256
rake stdout: Nothing written
rake stderr: rake aborted!
NoMethodError: undefined method `each' for #<String:0x0000565323a30eb8>
/var/www/html/Dev/rails/AppName/config/application.rb:10:in `<module:AppName>'
/var/www/html/Dev/rails/AppName/config/application.rb:9:in `<top (required)>'
/var/www/html/Dev/rails/AppName/Rakefile:4:in `require_relative'
/var/www/html/Dev/rails/AppName/Rakefile:4:in `<top (required)>'
/home/rdevc/.rbenv/versions/2.5.1/bin/bundle:23:in `load'
/home/rdevc/.rbenv/versions/2.5.1/bin/bundle:23:in `<main>'
(See full trace by running task with --trace)

是什么原因造成的? 完全满足了gem的依赖关系,并且服务器运行的开发版本与我在开发箱中使用的相同版本的ruby,rails和ubuntu。

1 个答案:

答案 0 :(得分:0)

我在部署此应用程序时遇到了无尽的问题。凭证问题,严重的噩梦等。最后,我开始了一个新的5.2.2项目,将其复制到控制器,模型,迁移,视图,路径等中,并将[6.0]的一些实例更改为[5.2]。首先尝试完美部署,该应用程序现已上线。我只能假定在Rails 6安装中无法完全正常工作。 伙计们,谢谢您的答复。

相关问题