Asset packaging

We are upgrading from rails 3 to rails 4. We were using jammit for
javascript/css asset packaging. Now we removed jammit, and are trying to
use rails 4 asset pipeline (sass-rails, uglifier, coffee-rails).
I have a couple of haml files under app/views/layouts,
anonymous.html.haml and application.html.haml, that have the following
line:
!= include_javascripts :base

I know this was used with jammit, but I don’t know what it should be
with rails 4. When I run the app on my server, I get this error:
undefined method `include_javascripts’ for
#<#Class:0x44b5f27e:0x57a6e849>
If I remove the line, the page loads, but without the layout stuff, so
the page looks weird.

The alternative is to get jammit to work with rails 4. Currently, if I
try to run my app with jammit on rails 4, I see this error:
YUI::Compressor::RuntimeError (Command ‘java -jar
/opt/tomcat-dse/webapps/dse/WEB-INF/gems/gems/yui-compressor-0.12.0/lib/yui/…/yuicompressor-2.4.8.jar
–type js --charset utf-8
/opt/tomcat-dse/temp/yui_compress20150325-3685-ebuhis’ returned non-zero
exit status):
gems/gems/yui-compressor-0.12.0/lib/yui/compressor.rb:106:in
`compress’

So bottom line, I am wondering whether to use jammit or not, and what
are the steps to get it working (either way). Thanks in advance.

I’m not sure if you’ve seen this already, but it could probably help you
along the jammit/rails 4 asset pipeline
https://github.com/kmamykin/mamykin.com/blob/master/_posts/2011-07-05-switching-to-assets-pipeline-from-jammit.textile

On Wednesday, March 25, 2015 at 10:58:21 AM UTC-4, Ruby-Forum.com User

Laura B. wrote in post #1171148:

dasibre wrote in post #1170964:

I’m not sure if you’ve seen this already, but it could probably help you
along the jammit/rails 4 asset pipeline

https://github.com/kmamykin/mamykin.com/blob/master/_posts/2011-07-05-switching-to-assets-pipeline-from-jammit.textile

On Wednesday, March 25, 2015 at 10:58:21 AM UTC-4, Ruby-Forum.com User

Ok, even after following those steps, my app doesn’t seem to be applying
the stylesheet stuff to the page. I don’t get any error messages though.

Aha, I think I found the missing piece. I needed to include each
javascript and stylesheet that was in the assets.yml file in my layout
haml files, each on its own line like this:
!= stylesheet_link_tag ‘ui.dynatree.css’

Thanks!

dasibre wrote in post #1170964:

I’m not sure if you’ve seen this already, but it could probably help you
along the jammit/rails 4 asset pipeline

https://github.com/kmamykin/mamykin.com/blob/master/_posts/2011-07-05-switching-to-assets-pipeline-from-jammit.textile

On Wednesday, March 25, 2015 at 10:58:21 AM UTC-4, Ruby-Forum.com User

Ok, even after following those steps, my app doesn’t seem to be applying
the stylesheet stuff to the page. I don’t get any error messages though.