-
Execute code if a script directly called
I often want to run some arbitrary code if I run a script directly. The primary example that comes to mind these days is: Strangely enough, despite primarily using Ruby on a daily basis, I haven’t really thought about how this test looks in Ruby: Bash seemed a little more obvious, but apparently there’s a…
-
gem install no implicit conversion of String into Integer
Here’s a puzzle You’re coming back to your ruby environment after a hiatus doing other programming things and doing a basic gem install produces something like the following with doing any gem install operation SSL Verify Mode in the .gemrc The ~/.gemrc file had a setting on the problem environment for ssl_verify_mode, but it turned…
-
gem environment, or where are my gems being loaded from, etc.
Ever have a problem with the wrong gem loading or the gem you’re expecting not being found? You can use the gem environment command to output various information about the RubyGems environment: If you export GEM_PATH=/path:/path2… those paths will be added to the GEM You can also see the remote sources, and the gem configuration…