Much hoopla has been made over Github stopping their gem building service, and for people to use Gemcutter.
All the stuff I’ve read has been that gemcutter is much better for publishing Gems, and that it’s easier to find the canonical gem (instead of deciding whether fred-mygem is better than barney-mygem)
Fair enough, but what about slobs like me that haven’t had to modify gems, and just want to start using the new source for gems and to update existing apps accordingly?
Turns out, it’s pretty easy.
1 2 3 4 5 6 |
|
If you look at ~/.gemrc, you’ll see that github has been pushed to the end:
1 2 3 4 5 6 7 8 9 10 11 |
|
The last thing to do is to reinstall the old github gems using their new names. In environment.rb and environments/*.rb, look for your config.gem lines:
1 2 3 |
|
Becomes:
1
|
|
Note that all you’re doing is taking off the owner of the gem, and then getting rid of the extra parameters.
It would be wise to first make sure that the gem is available on gemcutter. Browse to http://gemcutter.org/gems/GEMNAME, (eg http://gemcutter.org/gems/factory_girl) to see if you get an error.
Finally, run
rake gems:installfrom within your app’s directory to install the new gems.
Presto! It’s easier than I thought.