Skip to content

Instantly share code, notes, and snippets.

@riton
Created July 5, 2018 14:05
Show Gist options
  • Select an option

  • Save riton/21465ee4b23d50ab55e67cbb4ba76d20 to your computer and use it in GitHub Desktop.

Select an option

Save riton/21465ee4b23d50ab55e67cbb4ba76d20 to your computer and use it in GitHub Desktop.
ruby dynamically add path to gem load path
#!/usr/bin/env ruby
ENV['GEM_PATH'] = "/path/to/directory"
require 'mygem'
if __FILE__ == $0
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment