Created
December 12, 2022 15:39
-
-
Save gmcabrita/11cc1add7e49ae5c8de3ed6a80eab678 to your computer and use it in GitHub Desktop.
How to install a ruby gem and load it directly in the console without changing the Gemfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem_name = "ruby-progressbar" | |
`gem install #{gem_name}` | |
gem_folder_path = `gem which #{gem_name}`.strip.toutf8.gsub("#{gem_name}.rb", "") | |
$: << gem_folder_path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment