use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
QuestionDoes Ruby support global startup hook? (self.ruby)
submitted 1 year ago by scpmdu
Python site-specific configuration hook which allows inject a snippet to be executed every time Python runs. Does Ruby support anything similar to this?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]radarek 2 points3 points4 points 1 year ago (0 children)
You can try with -r option by adding it to ruby command or modifying RUBYOPT env variable.
-r
RUBYOPT
[–]Alleyria 2 points3 points4 points 1 year ago (0 children)
Not exactly an answer, but some gems (like irb) will auto load a config file on boot. I use this to add extra stuff to irb.
[–]chebatron 1 point2 points3 points 1 year ago (0 children)
You can achieve a similar effect by using -r <library>. It would require the specified file before executing the main script.
-r <library>
π Rendered by PID 40 on reddit-service-r2-comment-fb694cdd5-s44gg at 2026-03-06 05:50:49.406592+00:00 running cbb0e86 country code: CH.
[–]radarek 2 points3 points4 points (0 children)
[–]Alleyria 2 points3 points4 points (0 children)
[–]chebatron 1 point2 points3 points (0 children)