gpt4 book ai didi

ruby - gem install mongrel 使用 ruby​​ 1.9.1 失败

转载 作者:数据小太阳 更新时间:2023-10-29 06:29:27 25 4
gpt4 key购买 nike

我昨天开始接触 Rails 开发。
我安装了 ruby​​ 1.9.1、rubygems 和 rails。
运行 gem install mongrel 运行良好并且表面上也安装了 mongrel。我有点困惑,因为:

  • 脚本/服务器默认启动webrick
  • which mongrel 什么都不返回
  • locate mongrel 返回很多条目,例如
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.../usr/local/bin/mongrel_rails/usr/local/lib/ruby/gems/1.9.1/cache/mongrel-1.1.5.gem/usr/local/lib/ruby/gems/1.9.1/doc/actionpack-2.3.2/rdoc/files/lib/action_controller/vendor/rack-1_0/rack/handler/evented_mongrel_rb.html/usr/local/lib/ruby/gems/1.9.1/doc/actionpack-2.3.2/rdoc/files/lib/action_controller/vendor/rack-1_0/rack/handler/mongrel_rb.html/usr/local/lib/ruby/gems/1.9.1/doc/actionpack-2.3.2/rdoc/files/lib/action_controller/vendor/rack-1_0/rack/handler/swiftiplied_mongrel_rb.html/usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack/handler/evented_mongrel.rb/usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack/handler/mongrel.rb/usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack/handler/swiftiplied_mongrel.rb/usr/local/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5...

看起来我安装了 mongrel(默认安装和我的自定义安装)。那么为什么 which mongrel 不返回一些东西。

同时尝试使用 gem install mongrel 重新安装 mongrel 返回抛出它自己的一组异常:

Building native extensions.  This could take a while...ERROR:  Error installing mongrel:    ERROR: Failed to build gem native extension./usr/local/bin/ruby extconf.rb install mongrelchecking for main() in -lc... yescreating Makefilemakegcc -I. -I/usr/local/include/ruby-1.9.1/i386-darwin9.7.0 -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -D_XOPEN_SOURCE=1 -O2 -g -Wall -Wno-parentheses  -fno-common -pipe -fno-common  -o http11.o -c http11.chttp11.c: In function 'http_field':http11.c:77: error: 'struct RString' has no member named 'ptr'http11.c:77: error: 'struct RString' has no member named 'len'http11.c:77: warning: left-hand operand of comma expression has no effecthttp11.c:77: warning: statement with no effecthttp11.c: In function 'header_done':http11.c:172: error: 'struct RString' has no member named 'ptr'http11.c:174: error: 'struct RString' has no member named 'ptr'http11.c:176: error: 'struct RString' has no member named 'ptr'http11.c:177: error: 'struct RString' has no member named 'len'http11.c: In function 'HttpParser_execute':http11.c:298: error: 'struct RString' has no member named 'ptr'http11.c:299: error: 'struct RString' has no member named 'len'make: *** [http11.o] Error 1

最佳答案

您可以使用 sudo gem install mongrel --pre 安装 mongrel 1.2 prerelease:

$ sudo gem1.9 install mongrel --pre> Building native extensions.  This could take a while...> Successfully installed mongrel-1.2.0.pre2> 1 gem installed

关于ruby - gem install mongrel 使用 ruby​​ 1.9.1 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1073841/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com