更新:这是由于拼写错误的文件名
正确:
~/sample_app/app/controllers/microposts_controller.rb
不正确的:
~/sample_app/app/controllers/microposts_contoller.rb
这是我在这里的第一个贡献,赞赏改善这个或未来的贴子感谢:)
Ruby on Rails教程:使用Rails学习Web开发4
在完成第10.3章的过程中,我陷入困境.最后,一个拼写错误的文件名让我追了几天幽灵.
$ rspec spec/requests/authentication_pages_spec.rb
No DRb server is running. Running in local process instead ...
...FF................
Failures:
1) Authentication authorization for non-signed-in users in the Microposts controller submitting to the create action
Failure/Error: before { post microposts_path }
ActionController::RoutingError:
uninitialized constant MicropostsController
# ./spec/requests/authentication_pages_spec.rb:93:in `block (6 levels) in '
2) Authentication authorization for non-signed-in users in the Microposts controller submitting to the destroy action
Failure/Error: before { …Run Code Online (Sandbox Code Playgroud)