-X controls the kind of request you're making. You control that by creating the request type you want, i.e.: Net::HTTP::Post
(or Net::HTTP::Put
, and so on).
-d sets the data, so, request.set_form_data({"key" => "value"})
.
-u is for username (and password? i don't remember the specifics of -u with cURL), so, request.basic_auth("username", "password")
.
-H sets a header, so, request.add_field("header", "value")
I usually use this as a reference when I'm working with Net::HTTP and forget something (since its pretty easy to find on Google when I lose the link.)
PS: You can always install gems to a local directory and set a custom GEM_HOME and GEM_PATH instead of using the system-provided gem dirs.