Ruby development workflow

Currently I use the following development workflow for my ruby project,
I want to check if I am doing something wrong or any place I can

  1. install rbenv at ~/.rbenv
  2. install ruby-build at ~/.rbenv/plugins/ruby-build
  3. download ruby and installed under ~/.rbenv/versions

When I start a new ruby project, e.g., under path ~/Projects/myproject

  1. cd to the project folder, save a .ruby-version in the project folder
  2. prepare the gemspec
  3. Run

export GEM_PATH=./vendor/bundle/ruby/1.9.1;
export GEM_HOME="$GEM_PATH";
gem install bundler --no-ri --no-rdoc;
bundle install --path vendor/bundle
gem list

So all the gems will be installed into the local vendor folder

Question: Is my workflow special or standard way to handle multiple ruby
version and gems version?

I’m an RVM user, I can’t comment on the rbenv specific parts, but:

  • once you bundle install --path some/path, you need bundle exec gem list to show your bundled gems; plain gem list will show all gems
    installed globally for the current ruby version

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