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

前端 未结 7 1697
长情又很酷
长情又很酷 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 05:58

    I am using the same tutorial and ran into the exact same problem! You might've thought it was spork that fixed this but that wasn't it. The reason it worked is because you went ahead and upgraded the Rspec in the next section. It only works with the upgraded rspec - the old rspec was why your tests didn't pass. The site is wrong in that it tells users that the tests will pass before also changing the Rspec

提交回复
热议问题