我安装了 Ruby,更新了 gems,安装了 Rails,并添加了mysql
gem。但是,当我尝试使用 创建新项目时rails new new_project
,出现以下错误。另外,当我运行时rails -v
,我会遇到同样的错误。我确定问题与 Rails 有关,但有人知道问题是什么以及如何解决吗?
我已经清除了所有内容并重新安装了三遍,但没有成功。我确实thread_safe
安装了。
C:\dev32>rails -v
C:/Ruby200/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 C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1265: in `block in activate_dependencies'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1254: in `each'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1254: in `activate_dependencies'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1236: in `activate'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1268: in `block in activate_dependencies'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1254: in `each'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1254: in `activate_dependencies'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1236: in `activate'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb :48:in `gem'
from C:/Ruby200/bin/rails:22:in `<main>'
C:\dev32>rails new test_project
C:/Ruby200/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 C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1265: in `block in activate_dependencies'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1254: in `each'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1254: in `activate_dependencies'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1236: in `activate'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1268: in `block in activate_dependencies'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1254: in `each'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1254: in `activate_dependencies'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1236: in `activate'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb :48:in `gem'
from C:/Ruby200/bin/rails:22:in `<main>'
C:\dev32>
安装了以下 gem
*** LOCAL GEMS ***
actionmailer (4.0.0, 3.2.13)
actionpack (4.0.0, 3.2.13)
activemodel (4.0.0, 3.2.13)
activerecord (4.0.0, 3.2.13)
activerecord-deprecated_finders (1.0.3)
activerecord-sqlserver-adapter (3.2.12, 3.2.10)
activeresource (4.0.0, 3.2.13)
activesupport (4.0.0, 3.2.13)
arel (4.0.0, 3.0.2)
atomic (1.1.13 java)
bigdecimal (1.2.1, 1.1.0)
builder (3.1.4, 3.0.4)
bundler (1.3.5, 1.3.4)
coffee-rails (4.0.0, 3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.6.3, 1.6.1)
erubis (2.7.0)
execjs (2.0.1, 1.4.0)
hike (1.2.3, 1.2.1)
i18n (0.6.5, 0.6.1)
io-console (0.4.2, 0.3)
journey (1.0.4)
jquery-rails (3.0.4, 2.2.1)
json (1.8.0 java, 1.5.5)
mail (2.5.4, 2.5.3)
mime-types (1.25, 1.21)
minitest (4.7.5, 2.5.1)
multi_json (1.8.0, 1.7.1)
pg (0.16.0 x64-mingw32, 0.14.1 x86-mingw32)
polyglot (0.3.3)
rack (1.5.2, 1.4.5)
rack-cache (1.2)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (4.0.0, 3.2.13)
rails-observers (0.1.2)
railties (4.0.0, 3.2.13)
rake (10.1.0, 10.0.3, 0.9.2.2)
rb-readline (0.5.0, 0.4.2)
rdoc (4.0.1, 3.9.5)
rubygems-update (2.1.0)
rubyzip (1.0.0, 0.9.9)
sass (3.2.10, 3.2.7)
sass-rails (4.0.0, 3.2.6)
sprockets (2.10.0, 2.2.2)
sprockets-rails (2.0.0)
sqlite3 (1.3.8 x86-mingw32, 1.3.7 x86-mingw32)
sqlite3-ruby (1.3.3)
thor (0.18.1, 0.17.0)
thread_safe (0.1.2 java)
tilt (1.4.1, 1.3.6)
tiny_tds (0.6.1 x86-mingw32, 0.5.1 x86-mingw32)
treetop (1.4.15, 1.4.12)
tzinfo (1.0.1, 0.3.37)