Since I know almost nothing about Ruby, I'll ask the fedi hivemind for tips...

If I want to start up a Ruby REPL and import 'net/http' so that I can try one request using the latest version of the Gem, what steps should I follow? In Python I'd create a virtualenv and then use 'pip install' to install the package I want - so I assume something similar exists for Ruby. Bonus points if I can do the same thing but intentionally use an older (specific) version of the Gem.

#Ruby #RubyNewbie

@kevin Bundler has an inline mode that is great for single scripts (and the REPL, I assume, although I'm not sure I've ever used it like that).

https://guides.rubygems.org/bundler_in_a_single_file_ruby_script/

How to use Bundler in a single-file Ruby script - RubyGems Guides

Tutorials, guides, FAQs for RubyGems package management