Skip to content

Instantly share code, notes, and snippets.

@ferventcoder
Last active August 22, 2018 21:30
Show Gist options
  • Save ferventcoder/822146d5f12fa5195af0 to your computer and use it in GitHub Desktop.
Save ferventcoder/822146d5f12fa5195af0 to your computer and use it in GitHub Desktop.
local gem file for ruby development
# name the file Gemfile.local
gem 'fuubar'
gem 'pry'
gem 'pry-stack_explorer'
if RUBY_VERSION =~ /^2/
gem 'pry-byebug'
else
gem 'pry-debugger'
end
### you need this in your Gemfile for it to access the local Gemfile
if File.exists? "#{__FILE__}.local"
eval(File.read("#{__FILE__}.local"), binding)
end
@akofink
Copy link

akofink commented Aug 22, 2018

Bundler provides a way to evaluate a Gemfile:

Bundler.read_file("{__FILE__}.local")

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