ubuntu 12.04 ruby​​ 2.0 rails:找不到“thread_safe" [英] ubuntu 12.04 ruby 2.0 rails: Could not find 'thread_safe'

查看:49
本文介绍了ubuntu 12.04 ruby​​ 2.0 rails:找不到“thread_safe"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 ubuntu 12.04 上安装导轨.手动安装,使用此方法:如何安装 ruby​​ 2.0.0在 Ubuntu 12.04 上正确吗?

im installing rails on ubuntu 12.04. installed manualy, using this method: How do I install ruby 2.0.0 correctly on Ubuntu 12.04?

然后:

gem update --system 
gem install rails

现在如果我运行命令rails",输出如下:

now if i run command "rails" the output is as following:

/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:298:in `to_specs': Could not find 'thread_safe' (~> 0.1) - did find: [thread_safe-0.1.2-java] (Gem::LoadError)
        from /usr/local/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1265:in `block in activate_dependencies'
        from /usr/local/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1254:in `each'
        from /usr/local/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1254:in `activate_dependencies'
        from /usr/local/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1236:in `activate'
        from /usr/local/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1268:in `block in activate_dependencies'
        from /usr/local/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1254:in `each'
        from /usr/local/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1254:in `activate_dependencies'
        from /usr/local/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1236:in `activate'
        from /usr/local/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:48:in `gem'
        from /usr/local/bin/rails:22:in `<main>'

是的,我试过了:

gem install --version 0.1.2 thread_safe
gem uninstall thread_safe
gem install thread_safe

重新安装thread_safe rails后给了我同样的错误

after reinstalling thread_safe rails gave me the same error

推荐答案

看来您使用的是 2.1.0 版本的 ruby​​gems.这不是tread_safe 或atomic gems 的错误,而是rubygems 2.1.0 的错误.尝试安装旧版本(如 2.0.8).如何做到这一点:

Seems you are using 2.1.0 version of rubygems. It's not bug of tread_safe or atomic gems, but it's bug of rubygems 2.1.0. Try to install older version (like 2.0.8). How to do this:

gem uninstall rubygems-update
gem install rubygems-update --version 2.0.8
update_rubygems

这篇关于ubuntu 12.04 ruby​​ 2.0 rails:找不到“thread_safe"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆