简体   繁体   中英

Ubuntu 12.04 ruby 1.9.3 Rails 4.0: Could not find 'atomic'

When I try to create a rails app "rails new project" I get the following:

/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>'

I had the previous issue that is being discussed here ubuntu 12.04 ruby 2.0 rails: Could not find 'thread_safe' .

After installing the thread-safe gem, the error went away and then came up with the Could not find 'atomic' error. I tried:

gem install atomic

with various versions, but I am still getting this error. I noticed these issues have been appearing with other users today.

I have the exact issue right now on OSX 10.8.4

Do you have to use 1.9.3? I just switched to 2.0.0 and reinstalled rails and it's working fine.

Do you have rubygems 2.1.0 installed? Might be a rubygems 2.1.0 bug

Try this: sudo gem update --system 2.0.8

Then run the rails install again (after having uninstalled the -java gems of course)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM