更新:这是由于文件名拼写错误引起的。
正确的:
这是我的第一次贡献,欢迎提供反馈以改进此次或未来的发帖:)
Ruby on Rails教程:学习使用Rails 4进行Web开发 在阅读第10.3章时,我陷入了困境。最终,一个拼错的文件名让我在接下来的几天里一直在寻找问题所在。
正确的:
〜/sample_app/app/controllers/microposts_controller.rb
不正确的:〜/sample_app/app/controllers/microposts_contoller.rb
这是我的第一次贡献,欢迎提供反馈以改进此次或未来的发帖:)
Ruby on Rails教程:学习使用Rails 4进行Web开发 在阅读第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 { delete micropost_path(FactoryGirl.create(:micropost)) }
ActionController::RoutingError:
uninitialized constant MicropostsController
# ./spec/requests/authentication_pages_spec.rb:98:in `block (6 levels) in '
Finished in 0.92253 seconds
21 examples, 2 failures
Failed examples:
rspec ./spec/requests/authentication_pages_spec.rb:94 # Authentication authorization for non-signed-in users in the Microposts controller submitting to the create action
rspec ./spec/requests/authentication_pages_spec.rb:99 # Authentication authorization for non-signed-in users in the Microposts controller submitting to the destroy action