无法使用 Ruby 2.0 运行 Unicorn [英] Cannot run Unicorn with Ruby 2.0

查看:52
本文介绍了无法使用 Ruby 2.0 运行 Unicorn的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 ubuntu 机器上,我可以在 ruby​​ 1.9.3 上运行 unicorn,但是,它似乎不适用于 ruby​​ 2.0.知道为什么吗?

On my ubuntu machine, I can run unicorn on ruby 1.9.3, however, it does not seem to work with ruby 2.0. Any idea why?

root@dev:/home/karan# rvm use 1.9
Using /usr/local/rvm/gems/ruby-1.9.3-p429
root@dev:/home/karan# unicorn -v
unicorn v4.6.3
root@dev:/home/karan# rvm use 2.0
Using /usr/local/rvm/gems/ruby-2.0.0-p195
root@dev:/home/karan# unicorn -v
/usr/local/rvm/rubies/ruby-2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- unicorn/launcher (LoadError)
        from /usr/local/rvm/rubies/ruby-2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
        from /usr/bin/unicorn:3:in `<main>'

推荐答案

尝试使用 2.0.0 重新安装 gem.

Try reinstalling the gem with 2.0.0.

问题一定是因为 gem 安装在 1.9.3 中.

The problem must have been caused by the fact the gem was installed in 1.9.3.

这篇关于无法使用 Ruby 2.0 运行 Unicorn的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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