Skip to content

Instantly share code, notes, and snippets.

@sacarlson
Created August 26, 2015 06:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sacarlson/9f6c0bab86502f42e06b to your computer and use it in GitHub Desktop.
Save sacarlson/9f6c0bab86502f42e06b to your computer and use it in GitHub Desktop.
ruby rbenv with bundler project quickstart:
cd into/project/path
#if new version of ruby needed
rbenv versions # see what's available and what's set to run
rbenv install 1.9.3-p484
# set that installed version to run in this path 1.9.3-p484 is default ubuntu version
rbenv local 1.9.3-p484
# if this is a new installed version of ruby you will also need to install bundler
gem install bundler
bundle init
# now modify the Gemfile in your project path that was created by init above
# to include all gem "youwant"
# now install all the gems in Gemfile with:
bundle install
#after new gems installed
rbenv rehash
#to run your ruby app
bundler exec ruby ./yourrubyapp.rb
#what I found that might work for corupted gems like json
cd /to/rubyproject
bundle install --force
bundle exec gem install -f json #not tested yet
#also might try for corupted gems like json and ffi
cd /to/rubyproject
bundle exec gem pristine --all
bundle exec gem pristine ffi
bundle exec gem pristine json
#can't find gem?
bundle exec gem list rake --remote --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment