weixin_42361060 2010-03-17 14:51
浏览 365
已采纳

rails3 怎么不能用mongrel?

$rails s 默认启动webrick;

在根目录下直接启动mongrel则会出错:
[t**@localhost posts]$ mongrel_rails start
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require': no such file to load -- dispatcher (LoadError)
.....

google到 在Gemfile 中添加:
gem "mongrel"
gem "cgi_multipart_eof_fix"
gem "fastthread"
gem "experimental"

然后
$ bundle check
$ bundle lock
$ bundle install

[timor@localhost posts]$ bundle check
No compatible versions could be found for required dependencies:
Conflict on: "mongrel":
* mongrel (1.1.6) activated by mongrel (>= 0, runtime)
* mongrel (= 1.1, ) required by mongrel_experimental (>= 0, runtime)
All possible versions of origin requirements conflict.
[timor@localhost posts]$ bundle lock
No compatible versions could be found for required dependencies:
Conflict on: "mongrel":
* mongrel (1.1.6) activated by mongrel (>= 0, runtime)
* mongrel (= 1.1, ) required by mongrel_experimental (>= 0, runtime)
All possible versions of origin requirements conflict.
Run bundle install to install missing gems
[timor@localhost posts]$ bundle install
Fetching source index from http://gemcutter.org/
Resolving dependencies
Installing rake (0.8.7) from system gems
Installing rails (3.0.0.beta) from system gems
Installing actionpack (3.0.0.beta) from system gems
Installing railties (3.0.0.beta) from system gems
Installing activeresource (3.0.0.beta) from system gems
Installing activerecord (3.0.0.beta) from system gems
Installing activemodel (3.0.0.beta) from system gems
Installing activesupport (3.0.0.beta) from system gems
Installing actionmailer (3.0.0.beta) from system gems
Installing builder (2.1.2) from system gems
Installing rack (1.1.0) from system gems
Installing mongrel_experimental (1.1) from .gem files at /home/timor/.bundle/ruby/1.9.1/cache with native extensions /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:482:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

/usr/local/bin/ruby extconf.rb
checking for main() in -lc... yes
creating Makefile

make
gcc -I. -I/usr/local/include/ruby-1.9.1/i686-lin..............
.........................
rch’ differ in signedness
uri_classifier.c:186: error: ‘struct RString’ has no member named ‘len’
make: *** [uri_classifier.o] Error 1

Gem files will remain installed in /home/timor/.bundle/ruby/1.9.1/gems/mongrel_experimental-1.1 for inspection.
Results logged to /home/timor/.bundle/ruby/1.9.1/gems/mongrel_experimental-1.1/ext/uri_classifier/gem_make.out
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:

.....................

mongrel_experimental 安装失败

然后我单独安装mongrel_experimental gem

[timor@localhost posts]$ sudo gem install mongrel_experimental
Building native extensions. This could take a while...
ERROR: Error installing mongrel_experimental:
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb
checking for main() in -lc... yes
creating Makefile

make...................

还是不行。

我用的是CentOS 5.4 , 然后在vps (debian)上 都是同样的错误 .

有没有人成功运行了rails3+mongrel ?

  • 写回答

1条回答 默认 最新

  • qwe_rt 2010-03-17 15:05
    关注

    看看这个,博主集成成功了。
    http://jan.varwig.org/archive/rails-3-and-mongrel

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料