If you enable asset compressing you need to include JS compressor in
the Gemfile. Rails doesn't have it built-in.

A better solution would be to add these gems in assets group in
Gemfile and precompile/compress JS during deploy. Check out
http://devcenter.heroku.com/articles/rails31_heroku_cedar for details.

-Ville
On Jan 1, 11:45 pm, Scott LaBounty <[email protected]> wrote:
> OK, here's the answer should someone stumble upon this thread. Since it was
> only happening in production with Heroku, I added this ... to my Gemfile ...
>
> <<
> group :production do
>     gem 'pg'
>     gem 'uglifier'
>     gem 'therubyracer'
> end
>
>
>
> The 'pg' was there because I'm not using postgres in my development or test
> environment but sqlite. uglifier is needed for the problem above and it's
> because I believe that  I have this ...
>
> <<
>   # Compress JavaScripts and CSS
>   config.assets.compress = true
>
>
>
> in my confiig/environments/production.rb file (this is the default).
>
> The rubyracer gem came from the next problem I had where it couldn't find a
> javascript runtime.
>
> If there's a better way to handle this, please let me know.
>
> Scott
>
>
>
>
>
>
>
>
>
> On Sun, Jan 1, 2012 at 9:08 AM, Scott LaBounty <[email protected]> wrote:
> > All,
>
> > I'm seeing the following error ...
>
> > <<
> > 2012-01-01T16:32:25+00:00 app[web.1]:
> > 2012-01-01T16:32:25+00:00 app[web.1]: ActionView::Template::Error (no such
> > file to load -- uglifier
> > 2012-01-01T16:32:25+00:00 app[web.1]:   (in
> > /app/app/assets/javascripts/application.js)):
> > 2012-01-01T16:32:25+00:00 app[web.1]:     5:         <%= csrf_meta_tags %>
> > 2012-01-01T16:32:25+00:00 app[web.1]:     6:         <%= render
> > 'layouts/stylesheets' %>
> > 2012-01-01T16:32:25+00:00 app[web.1]:     7:         <%=
> > stylesheet_link_tag    "application", :media => "all" %>
> > 2012-01-01T16:32:25+00:00 app[web.1]:     8:         <%=
> > javascript_include_tag :application %>
> > 2012-01-01T16:32:25+00:00 app[web.1]:
> > app/views/layouts/application.html.erb:8:i
>
> > Since my gemfile doesn't contain uglifier, this makes some sense, but a)
> > everything runs fine locally and b) to the best of my knowledge, I'm not
> > trying to use it anywhere. I'm guessing it's a production only thing, but
> > I'm not sure what I should put where to fix it. A couple of suggestions on
> > stackoverflow didn't seem to work.
>
> > Any ideas?
>
> > Scott
>
> > --
> > Scott
> >http://steamcode.blogspot.com/
>
> --
> Scotthttp://steamcode.blogspot.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to