제 7 장 사용자 등록 까지

2051 단어 Rails
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 
덧붙이다
다시 한번
데이터베이스 액세스undefined local variable or method index' for UsersController:Class
http://localhost:3000/users 
이렇게 해서 성공적인 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:
1) 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
'
# ./app/controllers/users_controller.rb:1:in <top (required)>'
# ./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$ `

좋은 웹페이지 즐겨찾기