Skip to content

Instantly share code, notes, and snippets.

@meltzerj
Created June 29, 2011 03:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save meltzerj/1052999 to your computer and use it in GitHub Desktop.
Save meltzerj/1052999 to your computer and use it in GitHub Desktop.
Command failed: /rubyprograms/search --format jpg http://www.mtv.com/music/artist/lil_wayne/artist.jhtml -: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open3.rb:67:in `exec': Permission denied - /rubyprograms/search (Errno::EACCES) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open3.rb:67:in `popen3' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open3.rb:53:in `fork' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open3.rb:53:in `popen3' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open3.rb:51:in `fork' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open3.rb:51:in `popen3' from /Library/Ruby/Gems/1.8/gems/imgkit-1.3.1/lib/imgkit/imgkit.rb:77:in `to_img' from /rubyprograms/search/app/workers/image_generator.rb:6:in `perform' from /Library/Ruby/Gems/1.8/gems/resque-1.17.1/lib/resque/job.rb:127:in `perform' from /Library/Ruby/Gems/1.8/gems/resque-1.17.1/lib/resque/worker.rb:163:in `perform' from /Library/Ruby/Gems/1.8/gems/resque-1.17.1/lib/resque/worker.rb:130:in `work' from /Library/Ruby/Gems/1.8/gems/resque-1.17.1/lib/resque/worker.rb:116:in `loop' from /Library/Ruby/Gems/1.8/gems/resque-1.17.1/lib/resque/worker.rb:116:in `work' from /Library/Ruby/Gems/1.8/gems/resque-1.17.1/lib/resque/tasks.rb:27 from /Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `call' from /Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `execute' from /Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `each' from /Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute' from /Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:158:in `invoke_with_call_chain' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' from /Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain' from /Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke' from /Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task' from /Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level' from /Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `each' from /Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level' from /Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling' from /Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level' from /Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:62:in `run' from /Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling' from /Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:59:in `run' from /Library/Ruby/Gems/1.8/gems/rake-0.9.2/bin/rake:32 from /Library/Ruby/Gems/1.8/bin/rake:19:in `load' from /Library/Ruby/Gems/1.8/bin/rake:19
/Library/Ruby/Gems/1.8/gems/imgkit-1.3.1/lib/imgkit/imgkit.rb:87:in `to_img'
/rubyprograms/search/app/workers/image_generator.rb:6:in `perform'
/Library/Ruby/Gems/1.8/gems/resque-1.17.1/lib/resque/job.rb:127:in `perform'
/Library/Ruby/Gems/1.8/gems/resque-1.17.1/lib/resque/worker.rb:163:in `perform'
/Library/Ruby/Gems/1.8/gems/resque-1.17.1/lib/resque/worker.rb:130:in `work'
/Library/Ruby/Gems/1.8/gems/resque-1.17.1/lib/resque/worker.rb:116:in `loop'
/Library/Ruby/Gems/1.8/gems/resque-1.17.1/lib/resque/worker.rb:116:in `work'
/Library/Ruby/Gems/1.8/gems/resque-1.17.1/lib/resque/tasks.rb:27
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:62:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/bin/rake:32
/Library/Ruby/Gems/1.8/bin/rake:19:in `load'
/Library/Ruby/Gems/1.8/bin/rake:19
/Library/Ruby/Gems/1.8/gems/imgkit-1.3.1/lib/imgkit/imgkit.rb:87:in `to_img'
/rubyprograms/search/app/workers/image_generator.rb:6:in `perform'
/Library/Ruby/Gems/1.8/gems/resque-1.17.1/lib/resque/job.rb:127:in `perform'
/Library/Ruby/Gems/1.8/gems/resque-1.17.1/lib/resque/worker.rb:163:in `perform'
/Library/Ruby/Gems/1.8/gems/resque-1.17.1/lib/resque/worker.rb:130:in `work'
/Library/Ruby/Gems/1.8/gems/resque-1.17.1/lib/resque/worker.rb:116:in `loop'
/Library/Ruby/Gems/1.8/gems/resque-1.17.1/lib/resque/worker.rb:116:in `work'
/Library/Ruby/Gems/1.8/gems/resque-1.17.1/lib/resque/tasks.rb:27
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:62:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/bin/rake:32
/Library/Ruby/Gems/1.8/bin/rake:19:in `load'
/Library/Ruby/Gems/1.8/bin/rake:19
class ImageGenerator
@queue = :image_queue
def self.perform(url, search_term, page_number, result_number)
image = IMGKit.new("#{url}").to_jpg
end
end
@krainboltgreene
Copy link

class ImageGenerator
    @queue = :image_queue
    def self.perform(url, search_term, page_number, result_number)
        Rails.logger.debug url
        raise
        image = IMGKit.new("#{url}").to_jpg
    end 
end  

@meltzerj
Copy link
Author

@krainboltgreene
Copy link

krainboltgreene commented Jun 29, 2011 via email

@meltzerj
Copy link
Author

Yeah, he did mention it was his first gem: http://www.chriscontinanza.com/2010/12/12/Introding-IMGKit.html

@meltzerj
Copy link
Author

I originally used PhantomJS (http://www.phantomjs.org/) and it pretty much worked fine. I wanted to try this out because it was Ruby specific, could be run on Heroku, and thought it might perform faster. I don't think there's a way to install PhantomJS on Heroku so I'll have to get familiar with Linode or AWS (never used these before).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment