1

我正在阅读 railstutorial.org 的书。

我收到此错误:

$ bundle exec guard init rspec c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/guard-2.0.3/lib/guard/interactor.rb:1:in require': cannot load such file -- pry (LoadError) from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/guard-2.0.3/lib/guard/inter actor.rb:1:in'来自 c:/Ruby200-x64 /lib/ruby/gems/2.0.0/gems/guard-2.0.3/lib/guard/dsl.r b:2:in require' from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/guard-2.0.3/lib/guard/dsl.r b:2:in'来自 c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems /guard-2.0.3/lib/guard.rb:6:require' from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/guard-2.0.3/lib/guard.rb:6: in来自 c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/guard-2.0.3/bin/guard:3:in require' from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/guard-2.0.3/bin/guard:3:in ' 来自 c:/Ruby200-x64/bin/guard:23:in load' from c:/Ruby200-x64/bin/guard:23:in'

我的 gem 文件是: 1. source ' https://rubygems.org ' ruby​​ '2.0.0'

      # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
      gem 'rails', '4.0.0'


group :development, :test do
# Use sqlite3 as the database for Active Record
        gem 'sqlite3'
    gem 'rspec-rails', '2.13.1'
    gem 'guard-rspec', '2.0.0'
    gem 'guard', '2.0.3'
end

group :test do
    gem 'selenium-webdriver', '2.35.1'
    gem 'capybara', '2.1.0'
    gem 'rb-notifu', '0.0.4'
    gem 'win32console', '1.3.2'
    gem 'wdm', '0.1.0'
end

# Use SCSS for stylesheets
gem 'sass-rails', '4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '2.1.1'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more:     https://github.com/rails/turbolinks
gem 'turbolinks', '1.1.1'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder',  '1.0.2'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', '0.3.20', require: false
end

group :production do
  gem 'pg', '0.15.1'
  gem 'rails_12factor', '0.0.2'
end

我错过了什么吗?谢谢你的帮助!

4

2 回答 2

4

看起来警卫需要安装撬。

gem install pry
于 2013-10-08T04:53:06.607 回答
2

明确添加pry或类似于您的Gemfile. 我使用which 将在运行时pry-nav自动捆绑。prybundle install

# Gemfile
gem 'pry-nav', group: [:development, :test]

引用:

于 2014-03-12T12:39:26.220 回答