http://railstutorial.jp/chapters/sign-up?version=4.0#sec-signup_failure
ここをやっている
http://localhost:3000/users
にアクセス
The action 'index' could not be found for UsersController
と表示された
controlerにindexがないってこと?
controllers/users_controller.rb
に、
def index end
を追加
再度http://localhost:3000/users
にアクセス
undefined local variable or method
index' for UsersController:Class
そのまま、成功するverをつくってみようとしたけど、やっぱりRouting errorがでた
`$ bundle exec rspec spec/requests/user_pages_spec.rb \
-e "signup with valid information"
No DRb server is running. Running in local process instead ...
Run options: include {:full_description=>/signup\ with\ valid\ information/}
F
Failures:
- User pages signup with valid information should create a user
Failure/Error: before { visit signup_path }
ActionController::RoutingError:
undefined local variable or method `index' for UsersController:Class./app/controllers/users_controller.rb:3:in `class:UsersController'
./app/controllers/users_controller.rb:1:in `'
./spec/requests/user_pages_spec.rb:24:in `block (3 levels) in '
Finished in 0.01528 seconds
1 example, 1 failure
Failed examples:
rspec ./spec/requests/user_pages_spec.rb:42 # User pages signup with valid information should create a user
Randomized with seed 11922
ganshou-no-MacBook-Air:sample_app02 takako$ `