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

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

报告相同问题?

悬赏问题

  • ¥30 vb net 使用 sendMessage 如何输入鼠标坐标
  • ¥200 求能开发抖音自动回复卡片的软件
  • ¥15 关于freesurfer使用freeview可视化的问题
  • ¥100 谁能在荣耀自带系统MagicOS版本下,隐藏手机桌面图标?
  • ¥15 求SC-LIWC词典!
  • ¥20 有关esp8266连接阿里云
  • ¥15 C# 调用Bartender打印机打印
  • ¥15 我这个代码哪里有问题 acm 平台上显示错误 90%,我自己运行好像没什么问题
  • ¥50 C#编程中使用printDocument类实现文字排版打印问题
  • ¥15 找会编程的帅哥美女 可以用MATLAB里面的simulink编程,用Keil5编也可以。