san37@aaaaaa:~/workspace/sample_app (master) $ rails console
Loading development environment (Rails 4.0.5)
2.0.0-p643 :001 > bundle exec rake db:migrate
上記のコマンドをターミナルに入れたら
https://aaaaaa-san37-1.c9.io/user/1
で下記エラーが出てしまいました。
Routing Error
No route matches [GET] "/user/1"
Rails.root: /home/ubuntu/workspace/sample_app
Application Trace | Framework Trace | Full Trace
Routes
Routes match in priority from top to bottom
routes.rbにはルーティングの設定をしていると思うのですが↓どこに問題があるのでしょうか。
SampleApp::Application.routes.draw do
#get "users/show"
devise_for :users
resources :users, only: [:show]
root 'static_pages#home'
match '/help', to: 'static_pages#help', via: 'get'
match '/about', to: 'static_pages#about', via: 'get'
match '/contact', to: 'static_pages#contact', via: 'get'
end
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/01/09 08:56