1

我正在使用 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
4

2 回答 2

1

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

$ gem install mongrel --pre
于 2013-03-19T10:33:50.940 回答
0

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

gem install --local unicorn.gem

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

gem install kgio
gem install raindrops

并重复第一个命令。

于 2013-03-19T17:26:41.397 回答