0

Webmock gem をインストールしましたが、rspec テストが機能しなくなり、代わりに次のエラーが発生しました: (自動テストにガードを使用しています)

/home/neilmarion/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/spec_set.rb:90:in `block in materialize': Could not find crack-0.3.2 in any of the sources (Bundler::GemNotFound)
    from /home/neilmarion/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/spec_set.rb:83:in `map!'
    from /home/neilmarion/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/spec_set.rb:83:in `materialize'
    from /home/neilmarion/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/definition.rb:127:in `specs'
    from /home/neilmarion/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/environment.rb:27:in `specs'
    from /home/neilmarion/.rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:41:in `candidate?'
    from /home/neilmarion/.rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:60:in `setup'
    from /home/neilmarion/.rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:75:in `<top (required)>'
    from /home/neilmarion/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
    from /home/neilmarion/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
    from /home/neilmarion/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from /home/neilmarion/.rvm/gems/ruby-1.9.3-p194@global/bin/ruby_noexec_wrapper:9:in `<main>'

クラッキング 0.3.2 がすでに gem リストにあることがわかります。何が悪いのかわからない。

4

2 に答える 2

0

レーキbundle exec rake specが正しい宝石を拾わない場合があります。

bundle exec gem listクラック0.3.2が表示されていることを確認してください

于 2013-03-19T14:53:33.887 に答える
0

私はすでにこれを解決しました。グループ :test ブロックから「gem 'webmock'」という行を削除しました。

source 'https://rubygems.org'

gem 'rails', '3.2.12'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'activerecord-postgresql-adapter'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'
gem 'omniauth-twitter'
gem 'omniauth-facebook'
gem 'omniauth-identity'
gem 'devise'
gem 'webmock'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'

group :test, :development do
  gem 'rspec-rails'
  gem 'rb-inotify', '~> 0.9'
  gem 'better_errors'
end

group :test do
  gem 'capybara'
  gem 'factory_girl'
  gem 'guard-rspec'
  gem 'shoulda'
  gem 'launchy'
  gem 'database_cleaner'
end
于 2013-03-19T15:21:45.753 に答える