1

I am using OS X Mountain Lion. I've installed Ruby 2.0.0-p247. I've installed the Rubygems. I've installed Ruby 4.0.0. Everything was successfully installed (or seemed to be).

But when I try to verify the install of Rails by typing:

rails --version

I get:

/Users/dnassler/.rvm/rubies/ruby-2.0.0-p247/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.3-java] (Gem::LoadError)
    from /Users/dnassler/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1265:in `block in activate_dependencies'
    from /Users/dnassler/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1254:in `each'
    from /Users/dnassler/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1254:in `activate_dependencies'
    from /Users/dnassler/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1236:in `activate'
    from /Users/dnassler/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1268:in `block in activate_dependencies'
    from /Users/dnassler/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1254:in `each'
    from /Users/dnassler/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1254:in `activate_dependencies'
    from /Users/dnassler/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1236:in `activate'
    from /Users/dnassler/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:48:in `gem'
    from /Users/dnassler/.rvm/gems/ruby-2.0.0-p247@global/bin/rails:22:in `<main>'
    from /Users/dnassler/.rvm/gems/ruby-2.0.0-p247@global/bin/ruby_noexec_wrapper:14:in `eval'
    from /Users/dnassler/.rvm/gems/ruby-2.0.0-p247@global/bin/ruby_noexec_wrapper:14:in `<main>'

And if I type "gem list" this is what I have:

derek-nasslers-mac-mini:~ dnassler$ gem list

*** LOCAL GEMS ***

actionmailer (4.0.0)
actionpack (4.0.0)
activemodel (4.0.0)
activerecord (4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.0)
arel (4.0.0)
atomic (1.1.13 java)
builder (3.1.4)
bundler (1.3.5)
bundler-unload (1.0.1)
erubis (2.7.0)
hike (1.2.3)
i18n (0.6.5)
mail (2.5.4)
mime-types (1.25)
minitest (4.7.5)
multi_json (1.8.0)
polyglot (0.3.3)
rack (1.5.2)
rack-test (0.6.2)
rails (4.0.0)
railties (4.0.0)
rake (10.1.0)
rubygems-bundler (1.2.2)
rvm (1.11.3.8)
sprockets (2.10.0)
sprockets-rails (2.0.0)
thor (0.18.1)
thread_safe (0.1.3 java)
tilt (1.4.1)
treetop (1.4.15)
tzinfo (0.3.37)

Maybe the problem has something to do with the fact that my thread_safe seems to be java?

UPDATE: I've fixed the issue with the thread_safe complaint by trying:

gem install thread_safe -v 0.1

then when I try typing:

rails --version

...I get almost the same error as before but this time it couldn't find 'atomic' and that seems to be another gem that is a java version as well. However I cannot seem to get the ruby version of the gem because the ruby version is the same as the java version 1.1.13. I know this because I tried doing a gem search for atomic and I see:

gem search atomic

derek-nasslers-mac-mini:~ dnassler$ gem search atomic

*** REMOTE GEMS ***

atomic (1.1.13 ruby java)
atomic-parsley-ruby (0.0.3)
atomic_mem_cache_store (0.0.3)
atomics_resource (0.0.2)
AtomicTV (1.0.2)
datomic-client (0.4.1)
mongoid_atomic (0.1.0)
mongoid_atomic_votes (0.1)
rails_atomic_increment (0.2)

So I think that I could solve the issue if only I knew how to install the gem called "atomic" that is version 1.1.13 ruby. So how can I specify to install version 1.1.13 (the ruby version)? Simply doing "gem install atomic -v 1.1.13" does nothing because I already have version 1.1.13 (but it is the java version). I cannot yet figure out how to specify that I want the ruby version...

Anyone know how to specify to install the ruby version?

4

2 回答 2

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:59:23.543 回答
0

我遇到过同样的问题。在终端做

gem uninstall thread_safe 0.1.3 java
gem install thread_safe
gem uninstall atomic 1.1.13 java
gem install atomic

那应该这样做。

于 2013-09-11T16:28:52.350 回答