Note that there are some explanatory texts on larger screens.

plurals
  1. POCapistrano can't find .jar file
    text
    copied!<p>I'm writing a code which will minify and gzip certain CSS and JS files in my web site and then deploy them to online server. In my deploy.rb file I have:</p> <pre><code>namespace :deploy do task :start do end task :stop do end task :finalize_update do run "LANG=C find #{release_path} -type f -name '*.php' -exec sed -i 's/d1b03c1ee47aaa75040d7c45c4b77a2b/87c8273ed98d70c2e5c56cc487598a0e/g' {} \\;" end task :minify do #declare compressor compressor = "java -jar /home/yui_compressor/yuicompressor-2.4.8.jar" #name of the javascript files to be minify and compressed js_list = ["filter","onBoarding"] javascript_path = #{current_path}/js run "cd #{javascript_path}" js_list.each do |js| run "#{compressor} --type js #{js}.js -o #{js}.min.js" run "gzip -c #{js}.min.js &gt;#{js}.min.js.gz" end #name of the style files to be minify and compressed css_list = ["styles"] css_path = #{current_path}/css run ("cd #{css_path}") css_list.each do |css| run "#{compressor} --type css #{css}.css -o #{css}.min.css" run "gzip -c #{css}.min.css &gt;#{js}.min.css.gz" end end task :restart do end before "deploy:", "minify" after "deploy:restart" do #run "find #{release_path} -type f -exec chmod 644 {} \\;" #run "find #{release_path} -type d -exec chmod 775 {} \\;" end end </code></pre> <p>As you can see I'm using YUI Compressor. The problem is:</p> <pre><code>failed: "sh -c 'java -jar /home/yui_compressor/yuicompressor-2.4.8.jar --type js filter.js -o filter.min.js'" on my-server.com </code></pre> <p>What I'm doing wrong here? Thanks in advance</p> <p>EDIT: Basically what I want is to minify and gzip CSS/JS files and then to deploy to production, I'm trying to accomplish this with Capistrano(I already use Capistrano for changing some small parts of the files like you can see in finalize_update task). Any idea how to do this?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload