繁体   English   中英

由于红宝石消息,Capistrano部署失败

[英]Capistrano deploy fails due to ruby messages

我正在尝试使用capistrano 3.4.0和capistrano-rails 1.1.6部署我的应用程序,但似乎在资产清单期间,当复制.sprockets-manifest.json的命令运行时,ruby消息与Commandos混合并导致部署失败。

这是以前发生的,我可以通过将链轮gem降级到2.8版来修复它,但是在此我使用的是Rails 4.2.4,它至少需要一个链轮版本3。

下面是命令和输出,如果您能帮助我,我会很高兴。

提前致谢

INFO [19795580] Running /usr/bin/env cp RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too,  you can ignore these warnings with 'rvm rvmrc warning ignore /var/www/apps/meetings/releases/20160216200613/Gemfile'.  To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'.    /var/www/apps/meetings/releases/20160216200613/public/assets/.sprockets-manifest-5435a7146eb18edb8a835b87bffff57b.json /var/www/apps/meetings/releases/20160216200613/assets_manifest_backup as user@server
DEBUG [19795580] Command: cd /var/www/apps/meetings/releases/20160216200613 && /usr/bin/env cp RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too,  you can ignore these warnings with 'rvm rvmrc warning ignore /var/www/apps/meetings/releases/20160216200613/Gemfile'.  To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'.    /var/www/apps/meetings/releases/20160216200613/public/assets/.sprockets-manifest-5435a7146eb18edb8a835b87bffff57b.json /var/www/apps/meetings/releases/20160216200613/assets_manifest_backup
DEBUG [19795580]    RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too,
you can ignore these warnings with 'rvm rvmrc warning ignore /var/www/apps/meetings/releases/20160216200613/Gemfile'.
To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'.

DEBUG [19795580]    cp: cannot stat ‘RVM’: No such file or directory
cp: cannot stat ‘used’: No such file or directory
cp: cannot stat ‘your’: No such file or directory
cp: cannot stat ‘for’: No such file or directory
cp: cannot stat ‘selecting’: No such file or directory
cp: cannot stat ‘Ruby,’: No such file or directory
cp: cannot stat ‘it’: No such file or directory
cp: cannot stat ‘is’: No such file or directory
cp: cannot stat ‘all’: No such file or directory
cp: cannot stat ‘fine’: No such file or directory
cp: cannot stat ‘-’: No such file or directory
cp: cannot stat ‘Heroku’: No such file or directory
cp: cannot stat ‘does’: No such file or directory
cp: cannot stat ‘that’: No such file or directory
...
...

好。 造成此问题的原因是,rvm覆盖了cd命令,以便提供有关Gemfile中的ruby版本控制的某些信息,并且当capistrano-rails运行清单备份任务时,它运行cd命令以获取应用程序项目文件夹和rvm信息还返回并且部署导致了en错误。

为了解决这个问题,

rvm rvmrc warning ignore allGemfiles

可以在整个服务器范围内运行和禁用rvm消息,也可以在项目的根路径中创建一个名为.ruby-version的文件,并在其中设置ruby版本。 例如:

2.2.4

据我了解,.ruby-version用于rbenv,但是某种程度上它也禁用了rvm消息。

希望它也能帮助别人

Rails 4+对某些宝石的特定版本非常挑剔。 尝试将您的gemfile更新为以下内容:

group :development, :test do
  gem 'capistrano', '~> 3.4.0'
  gem 'capistrano-rvm'
  gem 'capistrano-bundler', '~> 1.1.2'
  gem 'capistrano-rails', '~> 1.1'
  gem 'capistrano-passenger'
end

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM