###わからないこと
railsでtypusを使いたくて、
としましたがエラーが出ました。
$ rails g typus /home/vagrant/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/mapper.rb:78:in `check_via': You should not use the `match` method in your router without specifying an HTTP method. If you want to expose your action to both GET and POST, add `via: [:get, :post]` option. If you want to expose your action to GET, use `get` in the router: Instead of: match "controller#action" Do: get "controller#action" (ArgumentError)
こちらのやり方でもやってみましたが、ダメでした。
gem 'typus', git:"https://github.com/typus/typus.git"
###その他
Rails.application.routes.draw do get 'sessions/new' root 'static_pages#home' get '/help' => 'static_pages#help' get '/about' => 'static_pages#about' get '/contact' => 'static_pages#contact' get '/signup' => 'users#new' get '/login' => 'sessions#new' post '/login' => 'sessions#create' delete '/logout' => 'sessions#destroy' resources :users resources :accout_activations, only: [:edit] end
###追記
なぜかサーバが立てれなくなっています。
$ rails s -b 0.0.0.0 => Booting Puma => Rails 5.0.0.1 application starting in development on http://0.0.0.0:3000 => Run `rails server -h` for more startup options Exiting /home/vagrant/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/mapper.rb:78:in `check_via': You should not use the `match` method in your router without specifying an HTTP method. (ArgumentError) If you want to expose your action to both GET and POST, add `via: [:get, :post]` option. If you want to expose your action to GET, use `get` in the router: Instead of: match "controller#action" Do: get "controller#action"
あなたの回答
tips
プレビュー