Welcome Guest | Login

TemplateError (wrong argument type FalseClass) Rails fails to start properly

So my app has no problem rendering several small partials controlled by the main controller (except for two, two actions called render_login and render_register).  However, when I try to render a view controlled by a different controller I run into this error.  

ActionView::TemplateError (wrong argument type FalseClass (expected Proc)) on line #81 of brothers/show.html.erb:
78:                     </div><br/>
79:             <% end %>
80:
81:             <% if cookies[:user_type] == "admin" %>
82:                     <%= link_to 'Edit', edit_brother_path(brother), :class => :brother_edit_link %>
83:                     <%= link_to 'Destroy', brother, :confirm => 'Are you sure?', :class => :brother_delete_link, :method => :delete %>
84:             <% end %> <br/><br/>

or simply get

Application error
Rails application failed to start properly

The interesting part is that sometimes the view renders correctly, but that is rarely.  don't understand it.  Any help is appreciated.

- Matt

2008-08-01 12:33 AM

We couldn't find any issue regarding the site and it is loading fine at our end. Did you make any changes at your end?

2008-08-01 02:18 AM

I haven't made any changes on my end.  If you go to www.brownphipsi.com and click on either the 'login' or 'register', occasionally 'News' and 'Current Brothers' link the following message is displayed:

Application error
Rails application failed to start properly

This of course only happens sometimes and other times it loads properly. I'm not sure why this is happening since I have no problems on my local development machine.  Thanks.

-Matt

2008-08-01 12:12 PM

The error you had was because fcgi was expecting a HOME environment variable on this page. I've added the directive given below into environment.rb file and your app is now loading fine.
ENV['HOME'] = '/home/brownph'

2008-08-01 02:07 PM

I hate to say it but my app is still doing the exact same thing.  No change at all.  I don't really know what to say.  Sorry.

- Matt

2008-08-01 07:30 PM

Hi- I've made some modification in the shebang line in your dispatch.fcgi. Your application is loading fine now.

2008-08-01 09:19 PM

Thanks so much Varun.  What exactly was wrong with the dispatch file, just for future reference.  Oh and one last weird thing, the app seems to be ignoring my routes.rb.  I've set the root to my main controller and set map.connect '' to the main controller index action, but it doesnt seem to recognize it.  Once again, thanks for all the help this has been beyond frustrating.

- Matt

2008-08-01 09:47 PM

Hi Ghostface,

The traces from the production log shows that the pages/index is the default path taking while accessing the URL. It seems like the application is functioning as per the values given in the config/routes.rb file.

2008-08-02 06:46 AM

Matt,

It's a Ruby bug. See this thread:
http://www.hostingrails.com/forums/deployment_troubleshooting_thread/1417

2008-08-04 09:39 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up today!