lib/magic_recipes/assets.rb in magic_recipes-0.0.2 vs lib/magic_recipes/assets.rb in magic_recipes-0.0.3

- old
+ new

@@ -42,33 +42,28 @@ set :rake, "rake" set :rails_env, "production" set :asset_env, "RAILS_GROUPS=assets" DESC task :precompile, :roles => assets_role, :except => { :no_release => true } do - run "cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile" + # run "cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile" if make_pulbic_folder_public chmod end - # run <<-CMD - # source '/usr/local/rvm/scripts/rvm' && - # rvm use 1.9.3 && - # cd #{latest_release} && - # #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile && - # #{sudo} chmod -R 777 public/ && - # #{sudo} chmod -R 777 tmp/ - # CMD + if use_rvm + run <<-CMD + source '#{rvm_path}/scripts/rvm' && + rvm use #{rvm_ruby}-#{rvm_patch}@#{rvm_gemset} && + cd #{latest_release} && + #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile + CMD + else + run "cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile" + end end desc "make the public folder public for all (777)" task :chmod, :roles => assets_role, :except => { :no_release => true } do run "cd #{latest_release} && #{sudo} chmod -R 777 public/ && #{sudo} chmod -R 777 tmp/" - # run <<-CMD - # source '/usr/local/rvm/scripts/rvm' && - # rvm use 1.9.3 && - # cd #{latest_release} && - # #{sudo} chmod -R 777 public/ && - # #{sudo} chmod -R 777 tmp/ - # CMD end desc <<-DESC Run the asset clean rake task. Use with caution, this will delete \ all of your compiled assets. You can specify the full path \ \ No newline at end of file