3

尝试运行时出现以下错误

“帽子生产独角兽:开始”

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

尾 -f 日志/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 中启动独角兽。在此先感谢

4

1 回答 1

0

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

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

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

在此行之前:

require 'bundler/capistrano'

似乎帮助捆绑者知道在哪里安装宝石。不知道为什么需要这样做。我以前从来不需要它。

编辑

在 capistrano3 上,如果您使用的是 gem rvm1-capistrano3,您可能需要更新它,因为这是一个固定问题

bundle update rvm1-capistrano3

此外,您应该使用capistrano3 叉capistrano-unicorn

将库添加到您的 Gemfile:

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

...并删除该行

 gem 'capistrano3-unicorn'
于 2014-03-11T16:41:11.477 回答