Package: rails
Version: 2.2.3-1
Severity: important

The ruby-policy specifies the ruby Module Path for looking for
things in particular order, by default in Debian, this is set to:

=> ["/usr/local/lib/site_ruby/1.8", "/usr/local/lib/site_ruby/1.8/i486-linux", 
"/usr/local/lib/site_ruby/1.8/i386-linux", "/usr/local/lib/site_ruby", 
"/usr/lib/ruby/vendor_ruby/1.8", "/usr/lib/ruby/vendor_ruby/1.8/i486-linux", 
"/usr/lib/ruby/vendor_ruby", "/usr/lib/ruby/1.8", 
"/usr/lib/ruby/1.8/i486-linux", "/usr/lib/ruby/1.8/i386-linux", "."]

Which works for the Debian installed ruby libraries, because they get
put under /usr/lib/ruby/1.8 and thus can be found by this search
path. However, this does *not* work for rails (which is for the most
part just a set of ruby libraries).

For example, I've got the libncurses-ruby1.8 package installed, and
this works:

irb(main):006:0> require 'ncurses'
=> true

However, when it comes to rails... the Debian packaged rails gets
installed under /usr/share/rails instead of in
/usr/lib/ruby/1.8/rails. As a result of this, rails cannot be found by
ruby, even though I've got the rails package installed. This is a
regression from how the rails gem works.

irb(main):007:0> require 'activerecord'
LoadError: no such file to load -- activerecord
        from (irb):7:in `require'
        from (irb):7
        from :0
irb(main):008:0> 

If you run irb and require 'rails' it should not fail.

The only way to get rails to work is to stick symlinks in each rails
application's vendor directory to point to the debian rails package
install location. The rails package itself does this when creating new
rails applications.

This doesn't seem like it should be necessary if the system's ruby
library knew how to find rails. 

Why is rails installed here? If there *is* a good reason for it being
here, then please reassign this bug to the ruby package so that the
$LOAD_PATH can be configured in Debian to know about this location.

I think that if this was fixed, it would resolve some confusion about
packaged Rails in debian and we could remove those silly symlinks
(which make for an annoying cap deploy, among many other issues that
make people say rails sucks in debian).

thanks for your work on rails, its very appreciated!
micah


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-trunk-vserver-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages rails depends on:
ii  libbuilder-ruby              2.1.2-1     Ruby library to facilitate program
ii  libjs-prototype              1.6.1-1     JavaScript Framework for dynamic w
ii  libredcloth-ruby1.8          4.2.2-1     Textile module for Ruby 1.8
ii  libruby [liberb-ruby]        4.2         Libraries necessary to run Ruby 1.
ii  libruby1.8-extras            0.5         a bundle of additional libraries f
ii  libsqlite3-ruby              1.2.4-2     SQLite3 interface for Ruby
ii  libxml-simple-ruby           1.0.12-1    Simple Ruby API for reading and wr
ii  rake                         0.8.7-1     a ruby build program
ii  rdoc                         4.2         Generate documentation from ruby s
ii  ruby                         4.2         An interpreter of object-oriented 
ii  ruby1.8                      1.8.7.249-1 Interpreter of object-oriented scr

Versions of packages rails recommends:
ii  irb                           4.2        Interactive Ruby (irb)
pn  libmocha-ruby                 <none>     (no description available)

Versions of packages rails suggests:
pn  libapache2-mod-ruby | libapac <none>     (no description available)
pn  libfcgi-ruby | libfcgi-ruby1. <none>     (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to