Skip to content

Instantly share code, notes, and snippets.

@githubutilities
Last active August 29, 2015 14:18
Show Gist options
  • Select an option

  • Save githubutilities/31eb992ee569bce8e395 to your computer and use it in GitHub Desktop.

Select an option

Save githubutilities/31eb992ee569bce8e395 to your computer and use it in GitHub Desktop.
Ruby CheatSheet

Ruby Tools

# lookup for `INSTALLATION DIRECTORY` and `GEM PATHS` env variables
gem env

# install from local gem repository
gem install --local path_to_gem/filename.gem

# Interactive ruby shell
irb
#or
irb <filename>

Managing Gems Using Bundler

bundle init

# update your `Gemfile`

bundle install
# this will create `Gemfile.lock` that keeps a snapshot of all gems' versions

Ruby file IO

Publishing your Gem

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment