The calendar is gone.
Click here to view posts


Gem to rails plugin
I most recently wrote a class to interface with IMBD.com. This class requires a library called hpricot. I locally gem install hpricot and create my code. I then added my code to my website. Do to the fact that I use shared hosting I do not have the proper rights to gem install my needed libraries. I could open a ticket with my hosting company, and wait for someone to get to it. Nah, I don't want to do that. I decided to look in to creating a plugin from a gem.

As it turns out most of the time you can.
This what I did to create a plugin for hpricot

    1)Make rails project
    2)ruby script/gen plugin hpricot
    3)Gem install
	a)If you can on the server change the gem root to a
	local file you have RW access to and gem install hpricot -i /path/you/can/write
	
	b)If you can not gem install on the server do it locally,but
	do not cross windows with linux (different flavors do not seem to matter
	to much)
    4) Locate the installed gem package
    5) Copy lib and ext from the gem to ror/vendor/plugins/hpricot/
    6) Should work like a champ.


I tried to do this with rmagik but it did not work. So its not 100% but it can be done. I am working on a rake command, much like rake rails, to create plugins from gems.