Ruby on Rails
Thursday, March 26, 2015
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 wrote:
On Wednesday, March 25, 2015 at 10:58:21 AM UTC-4, Ruby-Forum.com User wrote:
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.
--
Posted via http://www.ruby-forum.com/.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f9b4c156-f0ed-4971-a716-7ef24719f554%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment