Rail fails after update of Debian

I

Iwan van der Kleyn

Hi there,

Bit too Rail specific perphaps, but I'm very much a newbie so maybe that
will give me some slack :)

After an update of Debian (testing) today, which seemed to update a
whole bunch of ruby related packages, I've got both Gem and Rails
(locally installated) crashing on me. Stacktrace:

usr/local/lib/site_ruby/1.8/rubygems/loadpath_manager.rb:63:in
`directory?': string contains null byte (ArgumentError) from
/usr/local/lib/site_ruby/1.8/rubygems/loadpath_manager.rb:63:in
`search_loadpath'

The offending line is
result =
Dir.glob("{#{($LOAD_PATH).join(',')}}/#{file}{,.rb,.so}").delete_if {
|f| File.directory?(f)}.size > 0

it seems to crash on the file

/usr/lib/ruby/gems/1.8/gems/activerecord-1.1.0/lib/active_record/vendor/simple.rb

But as fas as I can see the filename doesn't contain any null-bytes.

On another machine I didn't perform the upgrade and there everyting
works as before.

Does anyone have any clue?

Regards,

Iwan
 
M

Mauricio Fernández

usr/local/lib/site_ruby/1.8/rubygems/loadpath_manager.rb:63:in
`directory?': string contains null byte (ArgumentError) from
/usr/local/lib/site_ruby/1.8/rubygems/loadpath_manager.rb:63:in
`search_loadpath' [...]
Does anyone have any clue?

Thu Nov 25 10:14:26 2004 Nobuyoshi Nakada <[email protected]>

* dir.c (push_braces): do not reuse buffer strings. [ruby-core:03806]
 
C

craig duncan

Mauricio said:
usr/local/lib/site_ruby/1.8/rubygems/loadpath_manager.rb:63:in
`directory?': string contains null byte (ArgumentError) from
/usr/local/lib/site_ruby/1.8/rubygems/loadpath_manager.rb:63:in
`search_loadpath'

[...]


Does anyone have any clue?

Thu Nov 25 10:14:26 2004 Nobuyoshi Nakada <[email protected]>

* dir.c (push_braces): do not reuse buffer strings. [ruby-core:03806]
What this cryptic response means is that a bug was introduced in 1.82.
This has been fixed in CVS (which i guess means version 1.9.0). But,
unfortunately, the debian 1.8.2 package hasn't been updated with the fix
yet. What i did was download the (stable) 1.8.1 release from
ruby-lang.org and compile it. Unfortunately, even though i changed the
paths in config.h (RUBY_LIB, RUBY_SITE_LIB, ...) to correspond with the
proper Debian locations, make install _still_ put some things in the
wrong places (my intention was to overwrite the existing debian-supplied
ruby stuff). Anyway, some manual moving of things around will get it to
work. Maybe the best solution would be to pin to debian-stable for ruby
stuff. That's not really so great either, though. We're too close to
the bleeding edge with rails right at the moment (because after the
update, a number of things had changed between old and new
rails-generated files, also).
 
M

Mauricio Fernández

usr/local/lib/site_ruby/1.8/rubygems/loadpath_manager.rb:63:in
`directory?': string contains null byte (ArgumentError) from
/usr/local/lib/site_ruby/1.8/rubygems/loadpath_manager.rb:63:in
`search_loadpath'

Does anyone have any clue?

Thu Nov 25 10:14:26 2004 Nobuyoshi Nakada <[email protected]>

* dir.c (push_braces): do not reuse buffer strings.
[ruby-core:03806]

What this cryptic response means is that a bug was introduced in 1.82.
This has been fixed in CVS (which i guess means version 1.9.0). But,
unfortunately, the debian 1.8.2 package hasn't been updated with the fix
yet.
What i did was download the (stable) 1.8.1 release from
ruby-lang.org and compile it. Unfortunately, even though i changed the
paths in config.h (RUBY_LIB, RUBY_SITE_LIB, ...) to correspond with the
proper Debian locations, make install _still_ put some things in the
wrong places (my intention was to overwrite the existing debian-supplied
ruby stuff). Anyway, some manual moving of things around will get it to
work. Maybe the best solution would be to pin to debian-stable for ruby
stuff. That's not really so great either, though. We're too close to

[...]

Sorry for the exceedingly short answer.
The problem is caused by some recent modifications in the ruby_1_8 branch
(also in HEAD). That was fixed on Nov 25, so if you get & compile a
recent stable-snapshot RubyGems will work fine. You need not switch to
1.9 for that.

You can also apply the patch I posted under
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/121702
to RubyGems' sources. That should fix the RubyGems issue you're
experiencing, regardless of the ruby version you use.

If you want to build your own Debian package corresponding to the latest
stable version from CVS, fetch the tarball, apt-get source ruby1.8,
and place it under ruby1.8-1.8.1+1.8.2pre2/ with a suitable name.
You'll have to remove several patches from debian/patches (they have
already been applied to that codebase). Then run fakeroot debian/rules
to create the binary packages.

If you want to overwrite the files managed by Debian (not a good idea),
just set the --prefix explicitly when running ./configure instead of
editing config.h. The settings used by Debian are (slightly edited):

/configure \
--prefix='/usr' \
--datadir='/usr/share' \
--mandir='/usr/share/man' \
--sysconfdir='/etc' \
--localstatedir='/var' \
--with-sitedir='/usr/local/lib/site_ruby' \
--with-default-kcode=none \
--with-dbm-type=gdbm_compat \
--with-tklib=tk8.4 \
--with-tcllib=tcl8.4 \
--with-tcl-include=/usr/include/tcl8.4 \
--with-bundled-sha1 \
--with-bundled-md5 \
--with-bundled-rmd160 \
--enable-pthread \
--enable-shared \
--enable-ipv6 \
--with-lookup-order-hack=INET

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top