Note that there are some explanatory texts on larger screens.

plurals
  1. PORails ActionView::Template::Error on production
    primarykey
    data
    text
    <p>I have a Rails 4 app working in development, but when I deploy to a VPS with Capistrano, I get the following error:</p> <pre><code>INFO -- : Started GET "/" for ***.***.***.*** at 2013-12-20 22:24:28 +0000 INFO -- : Processing by PortalsController#index as HTML INFO -- : Rendered portals/index.haml within layouts/application (2.9ms) INFO -- : Completed 500 Internal Server Error in 7ms FATAL -- : ActionView::Template::Error (key not found: :params): 1: %h2 2: = link_to "New portal", new_portal_path 3: 4: %h3 Current portals: 5: = render @portals app/views/portals/index.haml:2:in `_app_views_portals_index_haml___3074475544725108295_70221306145460' </code></pre> <p>In looking at differences between production.rb and development.rb, I discovered that setting </p> <pre><code>config.eager_load = false </code></pre> <p>in production.rb, the error goes away. However, I would like to keep the default setting of config.eager_load set to true. Does anyone have any ideas on why this would be happening?</p> <p>portals_controller.rb</p> <pre><code>def index @portals = Portal.all end </code></pre> <p>portals/index.haml</p> <pre><code>%h2 = link_to "New portal", new_portal_path %h3 Current portals: = render @portals </code></pre> <p>portals/_portal.haml</p> <pre><code>%p = link_to portal.name, portal </code></pre> <p>config/routes.rb</p> <pre><code>******::Application.routes.draw do root to: 'portals#index' resources :portals, shallow: true do resources :webpages do resources :documents end end mount Resque::Server, at: "/resque" end </code></pre> <p>I'm using unicorn and nginx on the VPS.</p>
    singulars
    1. This table or related slice is empty.
    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.
    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