пытаюсь установить rspec с bundler и rvm.ошибка: неопределенный метод 'spec' - PullRequest
2 голосов
/ 29 января 2011

Рельсы 2.3.8, бандлер 1.0.9.

Я получаю сообщение об ошибке:

<code>/Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/lib/bundler/source.rb:72:in <code>fetch': undefined method</code>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 <code>run'
    from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/lib/bundler/spec_set.rb:12:in</code>each'
    from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/lib/bundler/spec_set.rb:12:in <code>each'
    from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/lib/bundler/installer.rb:44:in</code>run'
    from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/lib/bundler/installer.rb:8:in <code>install'
    from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/gems/bundler-1.0.9/lib/bundler/cli.rb:225:in</code>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 <code>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</code>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 <code>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</code>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 <code>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</code>load'
    from /Users/dwalseth/.rvm/gems/ruby-1.8.7-p330@rails2/bin/bundle:19

Вот мой Gemfile:

<code>Using json (1.4.6) 
  1 source :gemcutter
  2  gem "httpclient"
  3  gem "will_paginate"
  4  gem "money"
  5  gem "curb"
  6  gem "paperclip"
  7  gem "crack"
  8  gem "searchlogic"
  9  gem "authlogic"
 10  gem "sendgrid"
 11  gem "gemcutter"
 12  gem "taps"
 13  gem "rails", "2.3.8"
 14  gem "aws-s3"
 15  gem "sqlite3-ruby", :require => "sqlite3"
 16  gem "encoding-dot-com"
 17  gem "hoptoad_notifier"
 18 gem "chargify_api_ares"
 19<br>
 20 group :development do
 21   gem "nifty-generators"
 22   gem "wirble"
 23   gem "hirb"
 24   gem "awesome_print", :require => "ap"
 25   gem "interactive_editor"
 26 end
 27 
 28 group :test do
 29   gem "rspec", "1.3.1"
 30   gem "rspec-rails", "1.3.3"
 31   gem "faker"
 32   gem "webrat"
 33   gem "cucumber"
 34   gem "cucumber-rails"
 35 end

Обратите внимание, когда я указываю какой-то другой каталог установки, например,

<code>bundle install path/to/installation_directory
он отлично устанавливает комплект.

Я не могу по жизни понять это!

1 Ответ

1 голос
/ 29 января 2011

Последняя версия rspec не поддерживает Rails 2.3.8.Вам нужно будет загрузить версию rspec 1.3.1.

Подробнее см. http://cheat.errtheblog.com/s/rspec/

...