[Ruby] Installing Gems on Dreamhost

Jordan Isip jordanisip at yahoo.com
Mon Oct 30 11:02:12 PST 2006


Hi Geoffrey,
 
 Thanks for the help!  I was able to unpack the flickr gem in my 'vendor' directory and I uploaded it to my rails app on dreamhost along with the modified environment.rb.  I am pretty sure it worked.  However, I seem to not be able to create a new flickr instance:
 
 
undefined method `new' for Flickr:Module
     RAILS_ROOT: ../config/..
               Application Trace |            Framework Trace |            Full Trace                   
#{RAILS_ROOT}/app/controllers/peanut_gallery_controller.rb:92:in `get_image'
#{RAILS_ROOT}/app/controllers/peanut_gallery_controller.rb:16:in `index'
#{RAILS_ROOT}/app/controllers/application.rb:18:in `process'
#{RAILS_ROOT}/app/controllers/application.rb:17:in `catch'
#{RAILS_ROOT}/app/controllers/application.rb:17:in `process'
     
 I am calling flickr = Flickr.new in my controller.  Do you (or anybody else on th list) have any ideas on why this is throwing this error message?  Am I missing something?
 
 Thanks again for your help!
 
 Jordan

Geoffrey Grosenbach <boss at topfunky.com> wrote: On Oct 30, 2006, at 12:09 AM, Jordan Isip wrote:
> Does anybody know how to install gems on dreamhost (shared server)?

If you're talking about Rails, the easiest way is to unpack the gem  
to the "vendor" directory and deploy it with the rest of your app. I  
wrote a plugin that does this:

http://topfunky.net/svn/plugins/topfunky_power_tools

rake topfunky:freeze:others GEMS="flickr"

Then add the appropriate directory to your load path in environment.rb:

   config.load_paths += %W(
     #{RAILS_ROOT}/vendor/flickr
   )

Geoff
......................................
Blog | http://nubyonrails.com
Podcast | http://podcast.rubyonrails.org
Workshops | http://rubyonrailsworkshops.com
Screencasts | http://peepcode.com


_______________________________________________
Ruby at zenspider.com
http://www.zenspider.com/seattle.rb
http://www.zenspider.com/mailman/listinfo/ruby



More information about the Ruby mailing list