Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coffee handler problems in production (Heroku) #14

Closed
JeanMertz opened this issue Oct 14, 2011 · 2 comments
Closed

coffee handler problems in production (Heroku) #14

JeanMertz opened this issue Oct 14, 2011 · 2 comments

Comments

@JeanMertz
Copy link

I just ran into a problem where my create.js.coffee file was working in development but stopped working in production (on Heroku). The logs show that Rails isn't even looking for a coffee handler:

2011-10-14T08:26:29+00:00 app[web.1]: ActionView::MissingTemplate (Missing template page_blocks/create, application/create with {:handlers=>[:erb, :builder, :haml], :formats=>[:html, :text, :js, :css, :ics, :csv, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json], :locale=>[:nl, :nl]}. Searched in:
2011-10-14T08:26:29+00:00 app[web.1]:   * "/app/app/views"
2011-10-14T08:26:29+00:00 app[web.1]: ):

This is the (important) part of my Gemfile:

group :assets do
  gem "sass-rails", "~> 3.1.0"
  gem "coffee-rails", "~> 3.1.0"
  gem "uglifier"
  gem "compass", "~> 0.12.alpha"
end

# asset templates
gem "jquery-rails"
gem "haml"

Only after I moved coffee-rails outside of the :assets group, things started working. Perhaps it would be a good idea to somehow make this clear in the readme, and perhaps even ship Rails with the coffee-rails plugin being placed outside the assets group.

@spastorino
Copy link

You have to have a js runtime, install assets group and you need bundler to require it in production in order to use this feature.
Feel free to provide a patch to the docs in order to help others :).
Thanks for the report.

guilleiguaran added a commit that referenced this issue Feb 28, 2013
Update README to document issue in #14
@FrancisGX
Copy link

@JeanMertz Thank you for posting this!! I had no idea what was happening since everything was working perfectly in development. Took me a while to hunt it down. Also, while @guilleiguaran's update to the readme is definitely a step in the right direction I think it might be beneficial to say something more obvious. Would you guys be ok with something like "You will get 500's unless you..." Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants