【问题标题】:rails - Could not find generator rspec:install.rails - 找不到生成器 rspec:install。
【发布时间】:2012-02-18 18:11:14
【问题描述】:

我不知道它找不到生成器。

gem install rspec
Fetching: rspec-core-2.8.0.gem (100%)
Fetching: rspec-expectations-2.8.0.gem (100%)
Fetching: rspec-mocks-2.8.0.gem (100%)
Fetching: rspec-2.8.0.gem (100%)
Successfully installed rspec-core-2.8.0
Successfully installed rspec-expectations-2.8.0
Successfully installed rspec-mocks-2.8.0
Successfully installed rspec-2.8.0
4 gems installed
Installing ri documentation for rspec-core-2.8.0...
Installing ri documentation for rspec-expectations-2.8.0...
Installing ri documentation for rspec-mocks-2.8.0...
Installing ri documentation for rspec-2.8.0...
Installing RDoc documentation for rspec-core-2.8.0...
Installing RDoc documentation for rspec-expectations-2.8.0...
Installing RDoc documentation for rspec-mocks-2.8.0...
Installing RDoc documentation for rspec-2.8.0...

$bundle install
...
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
$ script/rails generate rspec:install
Could not find generator rspec:install.

【问题讨论】:

    标签: ruby-on-rails ruby generator


    【解决方案1】:

    我会将以下内容添加到您的 Gemfile 中,我认为您缺少 rspec-rails gem。

      group :development, :test do
          gem "rspec-rails"
        end
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-10-01
      • 2013-03-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多