Category: ruby

  • 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…

  • Conditional gems in ruby without breaking Gemfile.lock

    Do you want ruby/bundler to skip a gem install on a certain platform, but any other platform needs that gem? The obvious answer would be the following, which would result in also clobbering your Gemfile.lock if bundling on macOS: gem “openssl”, “= 3.2.0” if RUBY_PLATFORM !~ /darwin/ But bundler has its own method, install_if , to accomplish such a…