22

我试图用 Apache2 和 ruby​​ 2.0 安装乘客,当我这样做时我遇到了这行错误:

passenger-install-apache2-module

错误:

--------------------------------------------
Compiling and installing Apache 2 module...
cd /usr/local/lib/ruby/gems/2.0.0/gems/passenger-3.0.19
/usr/local/bin/ruby /usr/local/bin/rake apache2:clean apache2 RELEASE=yes
# /usr/local/bin/ruby /usr/local/bin/rake apache2:clean apache2 RELEASE=yes
rake aborted!
cannot load such file -- rubygems/builder

(See full trace by running task with --trace)

--------------------------------------------

It looks like something went wrong

我试过:

gem install builder

但是这个错误仍然出现。我该如何解决?


编辑

红宝石版本:

2.0 p2

宝石清单:

bigdecimal (1.2.0)
builder (3.2.0)
bundler (1.3.1)
daemon_controller (1.1.1)
fastthread (1.0.7)
io-console (0.4.2)
json (1.7.7)
minitest (4.3.2)
passenger (3.0.19)
psych (2.0.0)
rack (1.5.2)
rack-protection (1.4.0)
rake (0.9.6)
rdoc (4.0.0)
sinatra (1.3.5)
test-unit (2.0.0.0)
tilt (1.3.4)
4

2 回答 2

50

更新说明:

$ gem install passenger --version 4.0.0.rc6
$ passenger-install-apache2-module
于 2013-03-10T21:11:12.130 回答
8

正如此报告的问题所指出的那样,Ruby 2.0 和乘客似乎存在问题:Passenger Ruby 2.0 issue

建议的解决方案之一(可以在其中的评论之一中找到):

git clone https://github.com/FooBarWidget/passenger.git
cd passenger
gem build passenger.gemspec
gem install passenger-3.9.5.rc3.gem (or type your actual built gem name)

编辑:

为了简化过程,还可以按以下方式安装预发布版本(指向任何最新的 RC 版本):

gem install passenger --pre
于 2013-03-05T20:04:34.487 回答