本文介绍了无法在 Capistrano 3 的端口 80 上启动我的独角兽的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试运行时出现以下错误
I get the following error while trying to run
DEBUG [29ec5890] Command: cd /home/ec2-user/apps/current && ( RAILS_ENV=production BUNDLE_GEMFILE=/home/ec2-user/apps/current/Gemfile ~/.rvm/bin/rvm default do bundle exec unicorn -c /home/ec2-user/apps/current/config/unicorn/production.rb -E deployment -D )
DEBUG [29ec5890] RVM is not a function, selecting rubies with 'rvm use ...' will not work.
DEBUG [29ec5890]
DEBUG [29ec5890] You need to change your terminal emulator preferences to allow login shell.
DEBUG [29ec5890] Sometimes it is required to use `/bin/bash --login` as the command.
DEBUG [29ec5890] Please visit https://rvm.io/integration/gnome-terminal/ for a example.
DEBUG [29ec5890]
DEBUG [29ec5890] master failed to start, check stderr log for details
cap aborted!
bundle stdout: Nothing written
tail -f log/unicorn.log
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/socket_helper.rb:185:in `new_tcp_server'
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/socket_helper.rb:165:in `bind_listen'
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:242:in `listen'
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:805:in `block in bind_new_listeners!'
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:805:in `each'
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:805:in `bind_new_listeners!'
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:138:in `start'
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/gems/unicorn-4.8.2/bin/unicorn:126:in `<top (required)>'
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/bin/unicorn:23:in `load'
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/bin/unicorn:23:in `<main>'
在 80 端口启动独角兽应该配置什么.提前致谢
What should be configured to start the unicorn in port 80. Thanks in advance
推荐答案
编辑
在 capistrano3 上,如果您使用 gem rvm1-capistrano3
,您可能需要更新它,因为它是一个 修复问题:
On capistrano3, if you are using gem rvm1-capistrano3
, you might need to update it, as it is a fixed issue:
bundle update rvm1-capistrano3
此外,您应该使用 capistrano-unicorn 的 capistrano3 fork代码>:
Also, you should use the capistrano3 fork of capistrano-unicorn
:
将库添加到您的 Gemfile:
group :development do
gem 'sepastian-capistrano3-unicorn', :require => false
end
...并删除该行
gem 'capistrano3-unicorn'
这篇关于无法在 Capistrano 3 的端口 80 上启动我的独角兽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!