undefined local variable or method `root_path' Hartl's Tutorial Chapter 5.3.2

前端 未结 7 1603
长情又很酷
长情又很酷 2021-01-04 05:12

So my first question on Stackoverflow..... =]

My tests in Chapter 5.3.2 of Michael Hartl\'s RoR Tutorial are all failing, when the tutorial says it should be passing

7条回答
  •  迷失自我
    2021-01-04 06:05

    I had a similar issue. My fix was to include the following line in spec_helper.rb

    config.infer_spec_type_from_file_location!
    

    BTW gems are:

    gem 'rails', '4.1.5'
    gem 'rspec-rails', '~> 3.0'
    

    and I also removed all the Guard and Spork stuff.

提交回复
热议问题