Package Manager RubyGems
gem install <gem_name>
install a gem globallygem list
list all installed gemsgem uninstall <gem_name>
uninstall a gemgem update
update all installed gemsgem update <gem_name>
update a specific gem
Dependency Management bundler
gem install bundler
install bundlerbundle init
init a new gemfilebundle install
install all gemfile dependenciesbundle update
update dependenciesbundle exec <gem_name>
run a scriptbundle exec rspec
bundle add <gem_name>
add a gem to the gemfile and install itbundle remove <gem_name>
remove a gem from the gemfile and uninstall itbundle check
verify all dependencies are installed
Version Manager rbenv
rbenv install <version>
install a specific ruby versionrbenv install --list
list all available ruby versionsrbenv versions
list installed ruby versionsrbenv global <version>
set a ruby version globallyrbenv local <version>
set a ruby version locally for the current projectrbenv uninstall <version>
remove a ruby version
Local Dev
bundle install # install dependencies
ruby app.rb # run
# or
bundle exec ruby app.rb # run w bundler