使用RubyGems安装gem的问题

时间:2013-03-18 23:04:32

标签: ruby rubygems ruby-on-rails-3.2

我正在使用Debian 5 Ruby版本1.8.7 Rubygems版本2.0.3 Rails版本3.2.12

我制作了我的Ruby on Rails应用并希望公开部署它,所以我试图安装“Mongrel”而没有任何运气,然后“Unicorn”也没有任何运气和同样的错误。

vps1198019:~# gem install mongrel
Building native extensions.  This could take a while...
ERROR:  Error installing mongrel:
        ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.8 extconf.rb

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/ext/http11/gem_make.out

vps1198019:~# gem install unicorn
Building native extensions.  This could take a while...
ERROR:  Error installing unicorn:
        ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.8 extconf.rb

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/kgio-2.8.0 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/kgio-2.8.0/ext/kgio/gem_make.out

2 个答案:

答案 0 :(得分:1)

尝试使用以下命令。由于版本不匹配,未安装gem。

$ gem install mongrel --pre

答案 1 :(得分:0)

所以我通过手动安装它找到了我的问题的解决方案。我从http://rubyforge.org/frs/?group_id=1306(。gem文件)下载了Unicorn。存储在服务器中。和终端一起去那个文件夹。然后我用

访问它
gem install --local unicorn.gem

然后它提示我必须有kgio和雨滴,所以我安装了它们:

gem install kgio
gem install raindrops

并重复第一个命令。