Rails 2.3.8,bundler 1.0.9。
我一直收到错误:
/Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/lib/bundler/source.rb:72:in fetch': undefined method
spec' for nil:NilClass (NoMethodError)
from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/lib/bundler/installer.rb:45:in run'
from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/lib/bundler/spec_set.rb:12:in
each'
from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/lib/bundler/spec_set.rb:12:in each'
from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/lib/bundler/installer.rb:44:in
run'
from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/lib/bundler/installer.rb:8:in install'
from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/lib/bundler/cli.rb:225:in
install'
from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/lib/bundler/vendor/thor/task.rb:22:in send'
from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/lib/bundler/vendor/thor/task.rb:22:in
run'
from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/lib/bundler/vendor/thor/invocation.rb:118:in invoke_task'
from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/lib/bundler/vendor/thor.rb:246:in
dispatch'
from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/lib/bundler/vendor/thor/base.rb:389:in start'
from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/bin/bundle:13
from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/bin/bundle:19:in
load'
from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/bin/bundle:19
这是我的Gemfile:
fetch': undefined method
注意,当我指定其他一些安装目录时,例如
run'
from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/lib/bundler/spec_set.rb:12:in
它安装好捆绑。
我不能为我的生活搞清楚!
答案 0 :(得分:1)
最新的rspec不支持Rails 2.3.8。您需要加载rspec版本1.3.1。
有关详细信息,请参阅http://cheat.errtheblog.com/s/rspec/