2

当我尝试创建一个 rails 应用程序“rails new project”时,我得到以下信息:

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

我在这里讨论了上一个问题ubuntu 12.04 ruby​​ 2.0 rails: Could not find 'thread_safe'

安装线程安全 gem 后,错误消失了,然后Could not find 'atomic' error.我尝试了:

gem install atomic

有各种版本,但我仍然收到此错误。我注意到今天其他用户也出现了这些问题。

4

2 回答 2

0

我现在在 OSX 10.8.4 上有确切的问题

你必须使用1.9.3吗?我刚刚切换到 2.0.0 并重新安装了 rails,它工作正常。

于 2013-09-10T19:41:39.460 回答
0

你安装了 ruby​​gems 2.1.0 吗?可能是 ruby​​gems 2.1.0 的错误

试试这个:sudo gem update --system 2.0.8

然后再次运行 rails install (当然是在卸载了 -java gems 之后)

于 2013-09-10T20:58:52.353 回答