Skip to content

Instantly share code, notes, and snippets.

@fffx
Created November 1, 2017 01:01
Show Gist options
  • Save fffx/46160e9cd68554d926617cbee530469c to your computer and use it in GitHub Desktop.
Save fffx/46160e9cd68554d926617cbee530469c to your computer and use it in GitHub Desktop.
Rails load additional gem without modify your project gemfile

bundler load gemfile by look up ENV["BUNDLE_GEMFILE"] , so your can set this enviromental variable to another gemfile , let say local_gemfile, and then in your local_gemfil, first load the project gemfile, and then add your additional ges.


# local_gemfile

 eval File.read('Gemfile')
 
 gem 'other_gems'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment