RailsCasts Pro episodes are now free!

Learn more or hide this

Allen Walker's Profile

GitHub User: auswalk

Site: blog.awalker.me

Comments by Allen Walker

Avatar

I have no issues compiling assets with my rvm setup on my current hosted env. Going thru these steps (using rbenv) I can't get the assets to compile. Really strange stacktrace


RAILS_ENV=production bundle exec rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/home/deployer/.rbenv/versions/1.9.3-p194/bin/ruby /home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
Command failed with status (): [/home/deployer/.rbenv/versions/1.9.3-p194/...]
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in block in create_shell_runner'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in
call'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in sh'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in
sh'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:80:in ruby'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in
ruby'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/sprockets/assets.rake:12:in ruby_rake_task'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/sprockets/assets.rake:21:in
invoke_or_reboot_rake_task'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/sprockets/assets.rake:29:in block (2 levels) in <top (required)>'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in
call'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in block in execute'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in
each'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in execute'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in
block in invoke_with_call_chain'
/home/deployer/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in mon_synchronize'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in
invoke_with_call_chain'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in invoke'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in
invoke_task'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in block (2 levels) in top_level'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in
each'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in block in top_level'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in
standard_exception_handling'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in top_level'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in
block in run'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in standard_exception_handling'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in
run'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in <top (required)>'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/bin/rake:23:in
load'
/home/deployer/apps/Merj-Web/shared/bundle/ruby/1.9.1/bin/rake:23:in `'
Tasks: TOP => assets:precompile

Avatar

Having issues with minimagick. Instead of

ruby
img.crop!(x, y, w, h)

I had to do:

ruby
img.crop "#{model.crop_x}x#{model.crop_y}+#{model.crop_w}+#{model.crop_h}"
img

But the thumb version of the image is not displaying properly.