rails generate rspec:install config/environments/development.rb:1:in `': undefined method `configure'

前端 未结 3 813
猫巷女王i
猫巷女王i 2020-12-15 13:38

first, here are my versions:

Greg-Nowickis-MacBook-Pro:sample_app Greg_Nowicki$ ruby -v
ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-darwin13.1.0]
Greg         


        
相关标签:
3条回答
  • 2020-12-15 14:19

    Changing development.rb did not help me at all.

    However, what did help me is:

    $ rvm 2.0.0

    BEFORE creating the app with

    $ rails new first_app

    Note that the Gemfile version was 2.0.0, and not 2.1.1 which is what I had originally, so match the ruby versions before you create your app.

    Not sure why this is important.

    0 讨论(0)
  • 2020-12-15 14:33

    Try using a different version of rspec by replacing the beta version with this version in your Gemfile: gem 'rspec-rails', '>= 2.14'

    EDIT: Have you run bundle install and rails generate rspec:install before trying to run rspec?

    0 讨论(0)
  • 2020-12-15 14:36

    In config/environments/development.rb:

    change

    Rails.application.configure do 
    

    to

    SampleApp::Application.configure do
    

    I checked a couple of my applications, and thats the format I have them.

    0 讨论(0)
提交回复
热议问题