当我想创建一个Ruby on Rails项目时,我得到以下消息。/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:55: uninitialized constant ActiveSupport::Dependencies::Mutex (NameError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support.rb:57 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/rails_generator.rb:31 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/bin/rails:15 from /usr/bin/rails:19:in `load' from /usr/bin/rails:19出了什么问题?我该如何解决?ruby-on-rails rubygems 兼容性
3 回答
猛跑小猪
TA贡献1858条经验 获得超8个赞
如果您不能升级到Ruby on Rails 2.3.11(并扩展douglasr的答案),则thread必须在的顶部boot.rb。例如:
require 'thread'
# Don't change this file!
# Configure your app in config/environment.rb and config/environments/*.rb
...
撒科打诨
TA贡献1934条经验 获得超2个赞
我能够通过将RubyGems降级到1.5.3来解决此问题,因为它发生在RubyGems 1.6.0+和Rails <2.3.11中:
gem update --system 1.5.3
如果您以前已降级到甚至更早的版本,并想更新到1.5.3,则在尝试运行该版本时可能会得到以下信息:
Updating RubyGems
ERROR: While executing gem ... (RuntimeError)
No gem names are allowed with the --system option
如果遇到该错误,请进行更新,以便您指定版本,然后再次降级:
gem update --system
gem update --system 1.5.3
- 3 回答
- 0 关注
- 755 浏览
添加回答
举报
0/150
提交
取消