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 well if you just want to try it and you have a system ruby, then it's "irb". then require "net/http".

if you want the equivelent of a venv, install rbenv.

@fishidwardrobe @kevin totally. If you just want to try something, no need for virtual environments or packages.
@lkanies @kevin although i should probably point out that net/http is not the friendliest library…
@fishidwardrobe @lkanies As mentioned in another reply, I need to build a reproducer for a bug in Mastodon->Paperclip->Seahorse->net-http, so I don't get to choose the library 🙂