Skip to content

Instantly share code, notes, and snippets.

@CKolkey
Last active March 14, 2024 15:44
Show Gist options
  • Save CKolkey/bf0bef4fa931e75d635e91b12d0c188a to your computer and use it in GitHub Desktop.
Save CKolkey/bf0bef4fa931e75d635e91b12d0c188a to your computer and use it in GitHub Desktop.
Using personal gems with Bundle without bothering your colleagues.
# NOTE: When updating gems, the ENV var below will need to be _unset_, so bundler updates the correct lock file.
# NOTE 2: The name 'Gemfile.dev' isn't important - it could be `dev_gems.rb` or anything else.
# SETUP:
# - Set the ENV var: BUNDLE_GEMFILE=Gemfile.dev in your app dir
# - Add Gemfile.dev and Gemfile.dev.lock to your .gitignore (global or local)
# - Copy the rest of this gist into Gemfile.dev (in your project root):
# Copy real lock file to ensure it gets priority
FileUtils.cp("Gemfile.lock", "Gemfile.dev.lock")
# Source real gemfile
eval_gemfile("Gemfile")
# Add personal gems below here
group :development do
gem "Your Gems Here"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment