Readline-6 update and Ruby issues

I had a ruby’s readline.so built against readline-5. After I got my Arch updated to readline-6 - got an error:

$ ./script/console
Loading development environment.
/usr/lib/ruby/1.8/i686-linux/readline.so: libreadline.so.5: cannot open shared object file: No such file or directory - /usr/lib/ruby/1.8/i686-linux/readline.so (LoadError)
  from /usr/lib/ruby/1.8/irb/completion.rb:10
  from /usr/lib/ruby/1.8/irb/init.rb:252:in `require'
  from /usr/lib/ruby/1.8/irb/init.rb:252:in `load_modules'
  from /usr/lib/ruby/1.8/irb/init.rb:250:in `each'
  from /usr/lib/ruby/1.8/irb/init.rb:250:in `load_modules'
  from /usr/lib/ruby/1.8/irb/init.rb:21:in `setup'
  from /usr/lib/ruby/1.8/irb.rb:54:in `start'
  from /usr/bin/irb:13

So I rebuild my ruby from sources with readline-6

ruby-1.8.6$ vi PKGBUILD
ruby-1.8.6$ makepkg 
==> Making package: ruby 1.8.6_p287_readline6-1 i686 (Tue Jul  7 13:49:00 EEST 2009)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
  -> Found ruby-1.8.6-p287.tar.bz2 in build dir
==> Validating source files with md5sums...
    ruby-1.8.6-p287.tar.bz2 ... Passed
==> Extracting Sources...
  -> bsdtar -x -f ruby-1.8.6-p287.tar.bz2
==> Entering fakeroot environment...
==> Starting build()...
....
==> Tidying install...
  -> Compressing man pages...
  -> Stripping debugging symbols from binaries and libraries...
  -> Removing empty directories...
==> Creating package...
  -> Generating .PKGINFO file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: ruby 1.8.6_p287_readline6-1 i686 (Tue Jul  7 13:54:55 EEST 2009)

ruby-1.8.6$ ll ruby*
-rw-r--r-- 1 gmarik users 3.8M 2009-03-23 08:47 ruby-1.8.6-p287.tar.bz2
-rw-r--r-- 1 gmarik users 3.2M 2009-03-23 09:44 ruby-1.8.6_p287-1-i686.pkg.tar.gz
-rw-r--r-- 1 gmarik users 3.2M 2009-07-07 13:54 ruby-1.8.6_p287_readline6-1-i686.pkg.tar.gz

Removed old ruby with readline-5

$ S pacman -Rd ruby
Password: 
(1/1) removing ruby                                 [##################################################################################################] 100%

And installed ruby compiled against readline-6

ruby-1.8.6$ S pacman -U ruby-1.8.6_p287_readline6-1-i686.pkg.tar.gz 
loading package data...
checking dependencies...
(1/1) checking for file conflicts                   [##################################################################################################] 100%
(1/1) installing ruby                               [##################################################################################################] 100%

But still was getting errors:

$ ./script/console 
Loading development environment.
/usr/lib/ruby/1.8/date.rb:727:in 'new':ArgumentError: invalid date
rp-badge-signup>

$ Date.jd
=> #<Date: -1/2,0,2299161>
rp-badge-signup> Date.jd.to_s
=> "-4716--1-1524"


$ ruby -rdate -e 'puts Date.parse'
/usr/lib/ruby/1.8/date.rb:931:in 'new_by_frags': invalid date (ArgumentError)
from /usr/lib/ruby/1.8/date.rb:975:in 'parse'
from -e:1

So eventually I just used readline.so built against version 6 and rolled back to my previous ruby package

$ sudo cp pkg/usr/lib/ruby/1.8/i686-linux/readline.so /usr/lib/ruby/1.8/i686-linux/

Comments