What are good ways for managing different versions of Gems and Ruby, and doing a deployment

For developing a (non-web) application, Git is used as a repository. The
application will of course various Gems, and their number will most
likely increase during development, and the Gem versions will change
too.

The application will be deployed from time to time to various hosts. On
each given hosts, various instances of the application will run in
parallel. The instances will differ in the Git version and/or the Ruby
version used to run them. What are practical ways to handle this
complexity?

So far, I came up with the following:

  • Gems should not be stored within Git.

  • I could use bundler, and the bundle file will go into Git.

  • For managing the different Ruby versions, I could use rvm

  • Deployment would mean to use Git to load a certain version of the
    application source in a specific directory and run rvm to execute the
    correct Ruby version and then bundler to install the correct Gems in the
    correct versions.

Is this a practical solution? Did I miss something? Are there better
ways to do this?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs