Ruby 升级到 ruby2.0 后,有一个文件找不到了,RubyChina 升级时是否有同样问题?

evil850209 · 2013年03月25日 · 最后由 ericguo 回复于 2013年05月17日 · 5808 次阅读

今天想尝试升级到 ruby2.0,但是遇到很多问题。

Using rake (10.0.3)
Using i18n (0.6.1)
Using multi_json (1.7.1)
Using activesupport (3.2.13)
Using builder (3.0.4)
Using activemodel (3.2.13)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.5)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.1)
Using tilt (1.3.6)
Using sprockets (2.2.2)
Using actionpack (3.2.13)
Using mime-types (1.21)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.5.3)
Using actionmailer (3.2.13)
Using arel (3.0.2)
Using tzinfo (0.3.37)
Using activerecord (3.2.13)
Using activeresource (3.2.13)
Using rack-ssl (1.3.3)
Using json (1.7.7)
Using rdoc (3.12.2)
Using thor (0.17.0)
Using railties (3.2.13)
Using sass (3.2.7)
Using anjlab-bootstrap-rails (2.3.1.1)
Using anjlab-widgets (1.0.3)
Using bcrypt-ruby (3.0.1)
Using coderay (1.0.9)
Using better_errors (0.7.2)
Using debug_inspector (0.0.2)
Using binding_of_caller (0.7.1)
Using will_paginate (3.0.4)
Using bootstrap-will_paginate (0.0.9)
Using cancan (1.6.9)
Using coffee-script-source (1.6.2)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using coffee-rails (3.2.2)
Using orm_adapter (0.4.0)
Using warden (1.2.1)
Using devise (2.2.3)
Using jquery-rails (2.2.1)
Using rack-contrib (1.1.0)
Using meta_request (0.2.2)
Using bundler (1.3.4)
Using rails (3.2.13)
Using sass-rails (3.2.6)
Using simple_form (2.1.0)
Using temple (0.5.5)
Using slim (1.3.6)
Using slim-rails (1.1.0)
Using sqlite3 (1.3.7)
Using strong_parameters (0.2.0)
Using uglifier (1.3.0)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

这是我的 bunlde,但当运行 rails s 后出现了下面的问题:

=> Booting WEBrick
=> Rails 3.2.13 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
D:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- 2.0/bcrypt_ext (LoadError)
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:234:in `block in load_dependency'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:639:in `new_constants_in'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:234:in `load_dependency'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/bcrypt-ruby-3.0.1-x86-mingw32/lib/bcrypt_ext.rb:2:in `<top (required)>'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:234:in `block in load_dependency'

好像是 bcrypt-ruby 这个 gem 引起的,但不知道为什么。 我先是在 windows 尝试的,今天回去再在 mac 下试试,不知道是否也会有同样的问题。

ext 没编译成功吧

win 下有不少 gem 都还没更新到对应 2.0 的版本,换成 ruby1.9.3 吧

2.0.0-p195+devkit,现在已经没有这个 2.0/bcrypt_ext (LoadError) 错误了。

需要 登录 后方可回复, 如果你还没有账号请 注册新账号