Ruby on rails 3.2 &引用;捆绑者:GemNotFound“;自动测试中的错误:Thor

Ruby on rails 3.2 &引用;捆绑者:GemNotFound“;自动测试中的错误:Thor,ruby-on-rails-3.2,bundler,autotest,thor,ruby-2.0,Ruby On Rails 3.2,Bundler,Autotest,Thor,Ruby 2.0,编辑:我回到了Thor 0.17.0,这似乎奏效了。不知道为什么,但它在那里 我可以找出原因,但我的自动测试停止运行测试,并给我以下错误: "/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby" -rrubygems -S "/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.13.1/exe/rspec" --tty "/Users/charliekim/programming/Ganesh/sp

编辑:我回到了Thor 0.17.0,这似乎奏效了。不知道为什么,但它在那里

我可以找出原因,但我的自动测试停止运行测试,并给我以下错误:

"/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby" -rrubygems -S "/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.13.1/exe/rspec" --tty "/Users/charliekim/programming/Ganesh/spec/controllers/pages_controller_spec.rb" "/Users/charliekim/programming/Ganesh/spec/controllers/student_groups_controller_spec.rb" "/Users/charliekim/programming/Ganesh/spec/controllers/students_controller_spec.rb" "/Users/charliekim/programming/Ganesh/spec/controllers/users_controller_spec.rb" "/Users/charliekim/programming/Ganesh/spec/models/student_group_spec.rb" "/Users/charliekim/programming/Ganesh/spec/models/student_spec.rb" "/Users/charliekim/programming/Ganesh/spec/models/user_spec.rb" "/Users/charliekim/programming/Ganesh/spec/requests/layout_links_spec.rb"
/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find thor-0.18.0 in any of the sources (Bundler::GemNotFound)
    from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler/spec_set.rb:85:in `map!'
    from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler/spec_set.rb:85:in `materialize'
    from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler/definition.rb:114:in `specs'
    from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler/definition.rb:159:in `specs_for'
    from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler/definition.rb:148:in `requested_specs'
    from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler/environment.rb:18:in `requested_specs'
    from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler/runtime.rb:13:in `setup'
    from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler.rb:120:in `setup'
    from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler/setup.rb:17:in `<top (required)>'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from /Users/charliekim/programming/Ganesh/config/boot.rb:6:in `<top (required)>'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/charliekim/programming/Ganesh/config/application.rb:1:in `<top (required)>'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/charliekim/programming/Ganesh/config/environment.rb:2:in `<top (required)>'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/charliekim/programming/Ganesh/spec/spec_helper.rb:3:in `<top (required)>'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/charliekim/programming/Ganesh/spec/controllers/pages_controller_spec.rb:1:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `block in load_spec_files'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `each'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load_spec_files'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in `run'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:in `run'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in `block in autorun'
“/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby“-rrubygems-S”/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.13.1/exe/rspec”--tty“/Users/charliekim/programming/Ganesh/spec/controllers/pages\u controller\u spec rb”“/Users/charliekim/programming/Ganesh/spec/spec/Ganesh/spec/controllers/student\u groups\u controller\u controller\u-spec“/Users/charliekim/programming/Ganesh/spec/controllers/students\u controller\u spec.rb”“/Users/charliekim/programming/Ganesh/controllers/Users\u controller\u spec.rb”“/Users/charliekim/programming/Ganesh/spec/models/student\u spec.rb”“/Users/charliekim/programming/Ganesh/spec/spec/student\u spec.rb”/Users/charliekim/programming/Ganesh/spec/models/user_spec.rb”“/Users/charliekim/programming/Ganesh/spec/requests/layout_links_spec.rb”
/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler/spec_set.rb:92:“物化中的块”:在任何源中都找不到thor-0.18.0(bundler::GemNotFound)
from/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler/spec_set.rb:85:in'map!'
from/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler/spec_set.rb:85:in'materialize'
from/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler/definition.rb:114:in'specs'
from/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler/definition.rb:159:in'specs_for'
from/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler/definition.rb:148:“请求的规范”中
from/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler/environment.rb:18:in“请求的规范”
from/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler/runtime.rb:13:in'setup'
from/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler.rb:120:in'setup'
from/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.3.4/lib/bundler/setup.rb:17:in`'
from/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site\u ruby/1.9.1/rubygems/custom\u require.rb:60:in'require'
from/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site\u ruby/1.9.1/rubygems/custom\u require.rb:60:in“require中的救援”
from/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site\u ruby/1.9.1/rubygems/custom\u require.rb:35:in'require'
来自/Users/charliekim/programming/Ganesh/config/boot.rb:6:in`'
from/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site\u ruby/1.9.1/rubygems/custom\u require.rb:36:in'require'
from/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site\u ruby/1.9.1/rubygems/custom\u require.rb:36:in'require'
from/Users/charliekim/programming/Ganesh/config/application.rb:1:in`'
from/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site\u ruby/1.9.1/rubygems/custom\u require.rb:36:in'require'
from/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site\u ruby/1.9.1/rubygems/custom\u require.rb:36:in'require'
from/Users/charliekim/programming/Ganesh/config/environment.rb:2:in`'
from/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site\u ruby/1.9.1/rubygems/custom\u require.rb:36:in'require'
from/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site\u ruby/1.9.1/rubygems/custom\u require.rb:36:in'require'
from/Users/charliekim/programming/Ganesh/spec/spec\u helper.rb:3:in`'
from/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site\u ruby/1.9.1/rubygems/custom\u require.rb:36:in'require'
from/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site\u ruby/1.9.1/rubygems/custom\u require.rb:36:in'require'
from/Users/charliekim/programming/Ganesh/spec/controllers/pages\u controller\u spec.rb:1:in`'
from/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in'load'
from/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:“加载规范文件中的块”
from/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in'each'
来自/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:“加载规范文件”
from/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.13.1/lib/rspec/core/command_-line.rb:22:in'run'
from/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:in'run'
from/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in“自动运行中的块”

关于GemNotFound错误,我在SO上看到了一些类似的问题,但解决方案似乎不适用于此。当我运行
bundle exex gem list
时,Thor 0.18.0出现了。

我刚刚在运行rake任务时遇到了类似的问题,并执行了以下操作来修复该问题

在gemfile中,将源代码从https更改为,然后运行bundle安装


然后我的rake任务成功了,不完全清楚为什么会发生这种情况,因为我很确定我的两台开发机器的设置是相同的。

解决方案是回滚到
Thor 0.17.0

您是否已将gemspec中Thor的版本设置为0.18.0?首先,您做了什么使我的代码看起来很好?对不起,它太难看了……关于gemspec…不知道如何编辑它。我明确地将它添加到我的gemfile中,但这并没有改变任何东西。我还在学习,所以我可能只是被你的意思弄糊涂了。请参阅以了解代码格式。我也在学习。你能在你的问题中包括gemfile吗?是的,这是: