I’m currently trying to deploy an Ruby on Rails 3.0.9 app on a production server. Everything seems to be going fine untill passenger gives an ‘We’re sorry, but something went wrong.’ error upon requesting the website.
The production log shows this error:
Rendered sessions/new.html.haml within layouts/application (5.7ms)
Completed 500 Internal Server Error in 8ms
ActionView::Template::Error (syntax error on line 7, col 7: `’):
2: %h2 Sign in
3: = form_for( :sessions, :url => sessions_path) do |f|4: .field
5: = f.label :email
6: %br/
7: = f.text_field :email
8: .field
app/views/sessions/new.html.haml:5:in
_app_views_sessions_new_html_haml__1068828667_250539460_0'_app_views_sessions_new_html_haml__1068828667_250539460_0′
app/views/sessions/new.html.haml:3:in
*Edit: Removing the f.label :email and f.label :password rows makes this error disappear, but this obviously isn’t a fix *
Some information about this error:
- I develop with aptana on windows
- A co-developer who works with this project on a mac, was subject to this error a while ago, but fixed this with some unknown magic with gemsets and rvm.
- Bundle list of the production server: http://pastie.org/private/0itpfmbfwqvhpheptqz4ha
- Github repository: http://github.com/boersmamarcel/Into-Reality-Portal
- I’m deploying with capistrano 2.0 and the bundle recipe for it
- A similar error also happens on other views, but somehow this error also points to line 7 of the file, and the error message sometimes shows random strings after
col 7:
- I can’t manage the global gemset on the production server
- Weird fact: If I remove the = f.label :password and = f.label :email rows, the error is gone :s
I would be very grateful if someone could help me with this. We have been working on this error for the whole day and it’s driving me nuts.
Thanks
– Bas
Edit: the f.label function seems to be causing the problem. I uploaded a trimmed down version of the view which generated the following error:
http://pastie.org/private/cqqipdvqod3r50x9ciwytq
This application runs succesfully on other mac-based and windows-based computers.
After puzzling with this error for hours and hours, it turned out the I18n gem caused this problem.
I had a unclosed entity in my en.yml which looked like this:
Removing the
date:part fixed this -in my opinion- very obscure errorThanks to all the people who used their braincycles on this problem :)!