Note that there are some explanatory texts on larger screens.

plurals
  1. PONo route matches {:action=>"show", :controller=>"controller_name"}
    text
    copied!<p>I'm always getting this error and I don't understand where I am wrong. I think I have everything I need action in controller, resources in route file and view for controller action. I put the route <code>current_events/new</code> in the browser when I get this error. I also try with just <code>resources :current_events</code></p> <p>output of <code>rake routes</code>:</p> <pre><code> current_events GET /current_events(.:format) current_events#index new_current_event GET /current_events/new(.:format) current_events#new current_event GET /current_events/:id(.:format) current_events#show </code></pre> <p><code>config/routes.rb</code>:</p> <pre><code>appname::Application.routes.draw do devise_for :users, controllers: { omniauth_callbacks: "omniauth_callbacks"} resources :current_events, only: [:show, :new, :index] end </code></pre> <p><code>CurrentEventsController</code>:</p> <blockquote> <pre><code>class CurrentEventsController &lt; ApplicationController def index @current_event = CurrentEvent.all respond_to do |format| format.html format.json { render json: @current_event } end end def create @current_event = CurrentEvent.new(params[:current_event]) respond_to do |format| if @current_event.save format.html { redirect_to @current_event, notice: 'current event was created.' } format.json { render json: @current_event, status: :created, location: @current_event } else format.html { render action: "new" } format.json {render json: @current_event.errors, status: :unprocessable_entity} end end end def new @current_event = CurrentEvent.new respond_to do |format| format.html format.json { render json: @current_event } end end def edit @current_event = CurrentEvent.find(params[:id]) end def destroy @current_event = CurrentEvent.find(params[:id]) @current_event.destroy respond_to do |format| format.html { redirect_to current_event_url} format.json { head :no_content } end end def show @current_event = CurrentEvent.find(params[:id]) respond_to do |format| format.html format.json{ render json: @current_event} end end end </code></pre> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload