Routing Error during “Ruby on Rails-Tutorial”

后端 未结 9 1988
忘了有多久
忘了有多久 2021-01-24 03:25

It seems like some people here had this problem but I couldn\'t find any solution in another topic.

I am doing Chapter 3 of the Ruby on Rails-Tutorial, working on the sta

9条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-24 03:53

    If you are using Spork you must re-run Spork so your tests will consider the changes in config files like routes.rb, that are pre-loaded with Spork, so are not automatically updated.

    1. Stop Spork (Ctrl + C)
    2. Run Spork again (bundle exec spork)

    Source: this is the source of this information "after changing a file included in the prefork loading (such as routes.rb), you will have to restart the Spork server to load the new Rails environment. If your tests are failing when you think they should be passing, quit the Spork server with Control-C and restart it

提交回复
热议问题