# Ruby 1.8.6 Source and Debian Apt-Get Upgrades

**URL:** <https://www.ruby-forum.com/t/ruby-1-8-6-source-and-debian-apt-get-upgrades/160554>\
**Category:** Ruby\
**Created:** [February 17, 2009, 5:43pm UTC](https://www.ruby-forum.com/t/ruby-1-8-6-source-and-debian-apt-get-upgrades/160554 "2009-02-17T17:43:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [February 17, 2009, 5:43pm UTC](https://www.ruby-forum.com/t/ruby-1-8-6-source-and-debian-apt-get-upgrades/160554/1 "2009-02-17T17:43:17Z")

</div>

Hi,

I am hoping to get some advice with a problem I have gotten myself into;

I upgraded my packages using apt-get yesterday and have found an issue  
with my installed (source built) version of Ruby 1.8.6. I am wondering  
if the update has interfered with my version of ruby as some of my  
rails projects no longer load correctly.

Error:  
NoMethodError (undefined method `fdiv' for 0:Fixnum): /usr/lib/ruby/1.8/yaml/rubytypes.rb:146:in `is\_binary\_data?’  
/usr/lib/ruby/1.8/yaml/rubytypes.rb:165:in `to_yaml' /usr/lib/ruby/1.8/yaml.rb:391:in `call’  
/usr/lib/ruby/1.8/yaml.rb:391:in `emit' /usr/lib/ruby/1.8/yaml.rb:391:in `quick\_emit’  
…

RubyGems Environment is I think still showing the right info:

- RUBYGEMS VERSION: 0.9.5 (0.9.5)
- RUBY VERSION: 1.8.6 (2007-09-24 patchlevel 111) [i686-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby
- RUBYGEMS PLATFORMS:
  - ruby
  - x86-linux

- GEM PATHS:
  - /usr/lib/ruby/gems/1.8

dpkg --get-selections shows:  
ruby1.8 install  
ruby1.8-dev install

Ruby -v shows:  
ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-linux]

apt-cache show ruby1.8:  
Package: ruby1.8  
Priority: optional  
Section: interpreters  
Installed-Size: 356  
Maintainer: akira yamada [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Architecture: i386  
Version: 1.8.7.72-3  
Depends: libc6 (\>= 2.7-1), libruby1.8 (\>= 1.8.7.72)  
Suggests: ruby1.8-examples, rdoc1.8, ri1.8

As you can see I am pretty confused about what has happened.

Is it possible apt-get broke something in this situation?  
Would a reinstall of ruby from source as I am now considering be a  
good idea to take at this stage?

Unfortunately I need to stick with RubyGems .9 and Ruby 1.8.6 for now  
for my current projects - so I can’t just upgrade to 1.8.7 with apt-get.

Any advice or suggestions greatly appreciated.

Many thanks,

Dominic

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [February 24, 2009, 9:37pm UTC](https://www.ruby-forum.com/t/ruby-1-8-6-source-and-debian-apt-get-upgrades/160554/2 "2009-02-24T21:37:55Z")

</div>

On 17.02.2009, at 17:39, removed\_email\_address@domain.invalid wrote:

> /usr/lib/ruby/1.8/yaml.rb:391:in `emit' /usr/lib/ruby/1.8/yaml.rb:391:in `quick\_emit’  
> …
> 
> RubyGems Environment is I think still showing the right info:
> 
> - RUBYGEMS VERSION: 0.9.5 (0.9.5)
> - RUBY VERSION: 1.8.6 (2007-09-24 patchlevel 111) [i686-linux]

According to [http://www.ruby-doc.org/core/classes/Fixnum.html](http://www.ruby-doc.org/core/classes/Fixnum.html)  
there is no method called Fixnum#fdiv().  
It seems that you have a yaml.rb of version 1.8.7.  
Try to reinstall your ruby version.

Just a guess: maybe you have defined stable in /etc/apt/sources.list  
and debian changed the version “stable” from etch to lenny.  
IIRC then there are two possible fixes:

1. “apt-get dist-upgrade”
2. change the “stable” keywords to “etch” or “lenny” in /etc/apt/  
sources.list

hth. regards, Sandor  
Szücs
