Issue #11956 has been updated by Am I Who. Nobuyoshi Nakada wrote: > I'm uncertain if rubygems expects such usage of `RUBYOPT` or not. > > Another way is to put your code in `rubygems/defaults/ruby.rb` under `RUBYLIB`. > This file is read only when `RUBY_ENGINE` is `"ruby"` at initialization of rubygems. RUBYOPT parse prior to rubygems before ruby 2.3.0, why ruby 2.3.0 change this? ---------------------------------------- Bug #11956: RUBYOPT parses after rubygems loaded https://bugs.ruby-lang.org/issues/11956#change-56026 * Author: Am I Who * Status: Feedback * Priority: Normal * Assignee: * ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) [x64-mingw32] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- RUBYOPT=-rloader but loader.rb loads after rubygems.rb loaded I change GEM_HOME and GEM_PATH in loader.rb , but it doesn't affect Gem.path. The same loader.rb works at ruby 2.2.3(and before) and jruby. I uses both MRI ruby and jruby,so I uses RUBYOPT to changes GEM_HOME and GEM_PATH for different ruby engine -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>