1

我是一个 ruby​​ 和 rails 新手,所以我的调试能力有些有限。

我刚刚添加了失败的eclipse插件,然后下载了最新的aptana studio,但也失败了。两种情况下的失败都是一样的。

失败的本质是,当我创建一个新的 rails 项目时,我收到一条关于库版本不兼容的错误消息“C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5-x86 -mswin32-60/lib/http11.so”。该项目实际上是与目录和文件一起创建的。

围绕此错误消息的 Google 搜索只返回了几次点击,这不是很有帮助

我想知道这是否是关于 64 位库。

我的软件堆栈是:

  • Windows 7 家庭高级版 64 位
  • Aptana RadRails,构建:2.0.5.1278709071
  • Ruby1.9.3 宝石 1.8.24

控制台显示:

"4320"
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': incompatible library version - C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5-x86-mswin32-60/lib/http11.so (LoadError)
    from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `block in require'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:12:in `<top (required)>'
    from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
    from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
    from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `block in require'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:1:in `<top (required)>'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/handler.rb:17:in `const_get'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/handler.rb:17:in `block in get'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/handler.rb:17:in `each'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/handler.rb:17:in `get'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rails-2.3.4/lib/commands/server.rb:45:in `<top (required)>'
    from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from script/server:3:in `<top (required)>'
    from -e:2:in `load'
    from -e:2:in `<main>'
4

1 回答 1

1

如上所述,这是关于 mongrel 的一个版本。请参阅http://en.wikipedia.org/wiki/Mongrel_(web_server )。

一个重要的部分是:

在原作者 Zed Shaw 离开 Ruby on Rails-scene[4] 之后,Mongrel 的发布停止了。当前版本 1.1.5 不再能够安装在高于 1.9.2 的 Ruby 版本中,这是为 Rails 3 推荐的,修复方法是使用不稳定的 Mongrel 更旧的 1.2.0-pre2 版本。

由于我是一个天真的 ruby​​ 用户,我想我会通过这些步骤来使 Aptana 工作。

1: run the command line interpreter, ensuring ruby is on the path
2: gem install -v 1.2.0-pre2 mongrel
3: Run aptana
4: open windows/preferences/rails
5: set the mongrel_rails path

我在 <ruby_home>/lib/ruby/gems/1.9.1/mongrel-1.2.0.pre2-x86-mingw32/bin/mongrel_rails 中找到了我的 mongrel_rails 路径

希望这对其他人有帮助

于 2012-07-28T07:26:07.363 回答