Reputation: 423
I resolved a code issue with a gem, but how do I then use that gem in my Rails 3.0.10 app? Do I just include the files in my app or do I need to recompile the gem? If I recompile the gem, how do I use it in my app?
Upvotes: 1
Views: 222
Reputation: 18784
Here's 3 ways you could go about this (and I have personally done each one for differing reasons):
Method 1)
Source your fork in your Gemfile something like so:
gem 'awesome_thing', :git => 'git://github.com/yourname/awesome_thing.git'
Send pull request and polite note to current maintainer (optional)
Method 2)
Source that gem folder in your Gemfile like so:
gem 'awesome_thing', :path => 'vendor/gems/awesome_thing-0.4.5'
Method 3)
Upvotes: 5
Reputation: 4737
What you should do is fork the git project that hosts the original gem...make your fixes and push back to git.
Then in your Gemfile do:
gem 'gemyoufixed', git: 'git://github.com/you/gemyoufixed'
Then bundle install...
Upvotes: 3