I’m deploying a new Rails app to Heroku. This is the first time I’ve used Rails 3.1 with Heroku’s Cedar server. I’ve never had so much trouble deploying an app!
First Ruby version problems, then asset precompilation errors, then gem and Procfile issues!
Now, all of the select form fields in my app appear to be generating errors. The app worked perfectly on a localhost, and I can’t work out what the problem is here.
An extract from the tail:
2011-12-08T10:35:00+00:00 app[web.1]: ActionView::Template::Error (/app/app/views/gears/_panel_dataentry.html.erb:23: syntax error, unexpected ',', expecting ')'
2011-12-08T10:35:00+00:00 app[web.1]: ...nd= ( collection_select (:gear, :gear_category_id, GearCateg...
2011-12-08T10:35:00+00:00 app[web.1]: ... ^
2011-12-08T10:35:00+00:00 app[web.1]: /app/app/views/gears/_panel_dataentry.html.erb:23: syntax error, unexpected ',', expecting tCOLON2 or '[' or '.'
2011-12-08T10:35:00+00:00 app[web.1]: ..._id, GearCategory.default, :id, :name, :prompt => 'Please se...
2011-12-08T10:35:00+00:00 app[web.1]: ... ^
2011-12-08T10:35:00+00:00 app[web.1]: /app/app/views/gears/_panel_dataentry.html.erb:23: syntax error, unexpected ')', expecting keyword_end
2011-12-08T10:35:00+00:00 app[web.1]: ...rompt => 'Please select...' ) );@output_buffer.safe_concat('...
2011-12-08T10:35:00+00:00 app[web.1]: 24: </tr>
2011-12-08T10:35:00+00:00 app[web.1]: 25: <tr>
This kind of error is occurring for every select field in the app.
The underlying code looks like:
<th><%= f.label :gear_category, "Category" %></th>
<td><%= collection_select (:gear, :gear_category_id, GearCategory.default, :id, :name, :prompt => 'Please select...' ) %></td>
Has this syntax changed in the latest version of Rails? Has anyone else encountered this issue? I’d appreciate any pointers or ideas!
Remove spaces between
collection_selectand(.