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

我在 SO 上看到了一些关于 GemNotFound 错误的类似问题,但解决方案似乎对此不起作用。当我运行bundle exex gem listThor 时,存在 0.18.0。

4

2 回答 2

0

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

在您的 gemfile 中,将源代码从 https 更改为http://rubygems.org,然后运行 ​​bundle install。

然后我的 rake 任务开始工作,但不完全确定为什么会发生这种情况,因为我很确定我的两台开发机器的设置相同。

于 2013-03-28T20:17:13.320 回答
0

解决方案是回滚到Thor 0.17.0

于 2013-08-24T10:41:06.357 回答