Note that there are some explanatory texts on larger screens.

plurals
  1. PORoutes Error - Ruby on Rails
    primarykey
    data
    text
    <p>I already have this in my routes file:</p> <pre><code>namespace :api do root :to =&gt; 'graphs#index' #default page when accessing /admin resources :graphs, :defaults =&gt; { :format =&gt; 'json' } match ':graphs/:id(/:method)' end </code></pre> <p>But when I try to open:</p> <pre><code>mydomain.com/api </code></pre> <p>or</p> <pre><code>mydomain.com/api/graphs/ </code></pre> <p>I got the following error:</p> <pre><code>2011-07-06T23:12:06+00:00 app[web.1]: /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.9/lib/action_dispatch/routing/mapper.rb:171:in `default_controller_and_action': missing :action (ArgumentError) 2011-07-06T23:12:06+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.9/lib/action_dispatch/routing/mapper.rb:72:in `normalize_options!' 2011-07-06T23:12:06+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.9/lib/action_dispatch/routing/mapper.rb:55:in `initialize' 2011-07-06T23:12:06+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.9/lib/action_dispatch/routing/mapper.rb:272:in `new' 2011-07-06T23:12:06+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.9/lib/action_dispatch/routing/mapper.rb:272:in `match' 2011-07-06T23:12:06+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.9/lib/action_dispatch/routing/mapper.rb:1173:in `match' 2011-07-06T23:12:06+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.9/lib/action_dispatch/routing/mapper.rb:1360:in `match' 2011-07-06T23:12:06+00:00 app[web.1]: from /app/config/routes.rb:84:in `block (2 levels) in &lt;top (required)&gt;' 2011-07-06T23:12:06+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.9/lib/action_dispatch/routing/mapper.rb:624:in `block in namespace' 2011-07-06T23:12:06+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.9/lib/action_dispatch/routing/mapper.rb:546:in `scope' 2011-07-06T23:12:06+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.9/lib/action_dispatch/routing/mapper.rb:624:in `namespace' 2011-07-06T23:12:06+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.9/lib/action_dispatch/routing/mapper.rb:1119:in `namespace' 2011-07-06T23:12:06+00:00 app[web.1]: from /app/config/routes.rb:80:in `block in &lt;top (required)&gt;' 2011-07-06T23:12:06+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.9/lib/action_dispatch/routing/route_set.rb:233:in `instance_exec' 2011-07-06T23:12:06+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.9/lib/action_dispatch/routing/route_set.rb:233:in `draw' 2011-07-06T23:12:06+00:00 app[web.1]: from /app/config/routes.rb:1:in `&lt;top (required)&gt;' 2011-07-06T23:12:06+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:235:in `load' 2011-07-06T23:12:06+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:235:in `block in load' 2011-07-06T23:12:06+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:227:in `load_dependency' 2011-07-06T23:12:06+00:00 app[web.1]: from &lt;internal:lib/rubygems/custom_require&gt;:29:in `require' 2011-07-06T23:12:06+00:00 heroku[web.1]: Process exited 2011-07-06T23:12:07+00:00 heroku[web.1]: State changed from starting to crashed </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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