views:

59

answers:

2

As a Ruby/Rails dabbler, one of the things that's long bothered me is this constant sense that I've just got gem clutter all over the place. Chalk it up to developer OCD, perhaps, or even my novice status as a Ruby/Rails dev, but not knowing where stuff is used, even if it's used, where it lives in my file system or whether it's part of a default install bothers me a little bit.

I've been using Bundler for a while and like what it does for documenting and managing at the project level, but my system as a whole sometimes feels like a great big hairball.

What strategies are folks employing to keep their gems contained and generally "knowable"? I'm running OS X and think I'd like to clear everything out and start over, but I'm not sure where I should do this cleaning and where I should avoid.

Thanks for your thoughts.

+1  A: 

I have been using RVM for some time now. It has the concept of gemsets that allows you to have multiple sets of gems. I have my development area which I occasionally wipe out to eliminate bloat and then my production gemset that keeps a minimized set of gems that I would need for a deploy. And then I have my 'gold' gemset which are the core gems I need to do my job. This is what I rebuild by development gemset from. This has worked nicely for me.

Geoff Lanotte
A: 

I have found RVM very helpful in segregating development environments. Making smart use of aliases and gemsets per project/groups of projects will help to keep your system installed ruby relatively 'clean' (as well as allow you to test across multiple ruby versions). When a project is done, you just dump the install.

Brian