IRB fails with --disable-gems and Ubuntu default LANG variable
$ echo $LANG LANG=en_US.UTF-8 $ ruby -v ruby 1.9.3dev (2011-01-30 trunk 30724) [i686-linux] $ ruby --disable-gems -S irb /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/locale.rb:150:in `block in search_file': uninitialized constant IRB::Locale::Gem (NameError) from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/locale.rb:158:in `block in each_localized_path' from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/locale.rb:167:in `each_sublocale' from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/locale.rb:157:in `each_localized_path' from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/locale.rb:145:in `search_file' from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/locale.rb:124:in `find' from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/locale.rb:108:in `load' from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/locale.rb:32:in `initialize' from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/init.rb:114:in `new' from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/init.rb:114:in `init_config' from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/init.rb:16:in `setup' from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb.rb:53:in `start' from /home/user/sandbox/ruby-trunk/bin/irb:12:in `'
If no disable-gems were present, IRB works.
unset LANG make IRB works even with --disable-gems
$ ruby --disable-gems -S irb irb(main):001:0> exit
Updated by headius (Charles Nutter) over 11 years ago
IRB's localization support appears to try using RubyGems to load the localized file?
This was the commit that added it. Does not appear to exist in 1.9.2:
Author: yugui yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Date: Wed Jan 5 01:13:12 2011 +0000
* lib/irb/locale.rb (IRB::Locale#search_file): make it possible to load a localization from a gem. (IRB::Locale#lc_path): obsoleted because of the change of #search_file (IRB::Locale#each_localized_path): new private method, based on lc_path (IRB::Locale#find): follows the change of #search_file. (IRB::Locale#load): removed duplicate with #find. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Updated by yugui (Yuki Sonoda) over 11 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r30741.
Luis, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- lib/irb/locale.rb (IRB::Locale::#search_file):
Gem might be undefined if --disable-gems. [ruby-core:34990]