Hacker News new | past | comments | ask | show | jobs | submit login

You can use gemsets and bundler together.

Gemsets simply allow you to have an isolated environment. If you want to install the gems from multiple projects in the same gemset the choice is yours.

Bundler just makes installing each project's dependencies easier.

The pattern I started to use recently was to check in include an .rvm file with the same gemset name as the project.

This way, I simply clone the project, install bundler, and then issue bundle install and my project is ready to go.




You can do this automatically with

    rvm ruby@gemset --create --rvmrc
`--create` creates a gemset if it doesn't already exist, and `--rvmrc` makes a .rvmrc file to automatically switch to that gemset when you cd into the current directory. This makes it easy enough, that I have a gemset per application/project, and then use bundler to install the deps.


Probably just personal preference, but for me, I like to have the .rvmrc file in source control so that I don't have to think about setting it up.

The first time I navigate to the directory the gemset is created.

Still a good tip. Thanks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: