无法在 Capistrano 3 的端口 80 上启动我的独角兽 [英] Unable to start my Unicorn on Port 80 on Capistrano 3

查看:61
本文介绍了无法在 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

推荐答案

尝试遵循有关此响应的建议:

在我的 deploy.rb 文件中,设置这一行:

In my deploy.rb file, setting this line:

set :bundle_dir, "/usr/local/rvm/gems/ruby-X.X.X-pXXX"

在这一行之前:

require 'bundler/capistrano'

似乎可以帮助捆绑程序知道在哪里安装 gems.不知道为什么这是需要的.我以前从不需要它.

seemed to help bundler know where to install the gems. Not sure why this is needed. I've never needed it before.

编辑

在 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:

Add the library to your Gemfile:

group :development do
  gem 'sepastian-capistrano3-unicorn', :require => false
end

...并删除该行

 gem 'capistrano3-unicorn'

这篇关于无法在 Capistrano 3 的端口 80 上启动我的独角兽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆