$ rails generate rspec:install
/Users/AlbertoRDZ/Desktop/rails_projects/sample_app/config/application.rb:7:in `<top (required)>': undefined method `groups' for Rails:Module (NoMethodError)
from /Users/AlbertoRDZ/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.9/lib/rails/commands.rb:15:in `require'
from /Users/AlbertoRDZ/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.9/lib/rails/commands.rb:15:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
答案 0 :(得分:1)
也许它适用于以下内容:
在config/application.rb
替换
if defined?(Bundler)
Bundler.require(*Rails.groups(:assets => %w(development test)))
end
与
Bundler.require(:default, Rails.env) if defined?(Bundler)