Today this is pretty easy to do with Bundler. You make a local copy of the gem and then instead of doing
gem "whatever"
in your Gemfile, you do:
gem "whatever", :path => "/home/pupeno/whatever"
After running bundle install, the gem is picked from that directory. Even if you modify something in there, all you need to do to re-load it is restart Rails.
If you need to deploy an application using your own changes of a Gem, you make a fork, on Github or similar and on the Gemfile you do:
gem "whatever", :git => "[email protected]:/pupeno/whatever.git"
and that's it. It's simple, straightforward and beautiful.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…