This page is READ-ONLY. It is generated from the old site.
All timestamps are relative to 2013 (when this page is generated).
If you are looking for TeX support, please go to

ruby-1.8.7-head: chomp called for nil:NilClass

-head ... sucks???
Added by icy almost 2 years ago  »  Votes: 2/2

I am using ruby-1.8.7-head with helps of RVM . This is the first time I've used a head version of ruby. And the first try is often hard :P

$ ruby -e "require 'rubygems'; require 'net/ssh'" 
/home/pi/.rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/logger.rb:174: private method `chomp' called for nil:NilClass (NoMethodError)
        from /home/pi/.rvm/rubies/ruby-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
        from /home/pi/.rvm/rubies/ruby-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
        from /home/pi/.rvm/gems/ruby-1.8.7-head/gems/net-ssh-2.1.4/lib/net/ssh.rb:5
        from /home/pi/.rvm/rubies/ruby-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:58:in `gem_original_require'
        from /home/pi/.rvm/rubies/ruby-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:58:in `require'
        from -e:1

There problem comes from logger.rb. Let's take a look at the 174th line of the file:

1 class Logger
2   VERSION = "1.2.6" 
3   id, name, rev = %w$Id$
4   ProgName = "#{name.chomp(",v")}/#{rev}" 

In the official version (logger.rb from ruby-1.8.7 stable version):

1 class Logger
2   VERSION = "1.2.6" 
3   id, name, rev = %w$Id: logger.rb 22285 2009-02-13 10:19:04Z shyouhei $
4   ProgName = "#{name.chomp(",v")}/#{rev}" 

So the author used SVN ID string to set some properties of the class. In HEAD version, such information wasn't substituted, as RVM forked the source from a git repository, not a subversion repository. As git simply ignores $Id$, it makes the head version stupid :))

As a work-around, I've just forced a phantom value for id,name,rev :)