Debian Poop...Gems/Rails etc...

Discussion in 'Ruby' started by Tom Willis, Mar 16, 2005.

  1. Tom Willis

    Tom Willis Guest

    Is anyone else struggling with Ruby on Debian unstable (or as I like
    to call it, Red Hat Stable :))? It seems to me that Debians Package
    management is fighting with Gems, but I don't know enough about Ruby
    to know for sure, or what the correct way of doing things is.

    I wanted to play with ActiveRecord last night, and I assumed I had
    Rails installed because

    #gem install rails --remote


    reported no problems, and a few days later the same version showed up
    in apt so I Installed it from there as well. Maybe this was a mistake
    I don't know.


    Anyway, irb reports $LOAD_PATH to be....

    /usr/local/lib/site_ruby/1.8
    /usr/local/lib/site_ruby/1.8/i386-linux
    /usr/local/lib/site_ruby
    /usr/lib/ruby/1.8
    /usr/lib/ruby/1.8/i386-linux



    anyway, from memory...jumping into irb

    >require 'active_record'

    LoadError: no such file to load -- active_record

    So I search all the entries in $LOAD_PATH and sure enough no active_record.rb


    Do a find for active_record.rb and it's in /usr/share/rails/activerecord/lib/


    #cd /usr/share/rails/activerecord/lib
    #irb
    >require 'active_record'

    another error about ClassInheritableAttributes

    which is in /usr/share/rails/activesupport/lib

    Then I notice a install.rb in /usr/share/rails/activerecord so I run
    that hoping it will take care of things. and it bombs on a provider
    for oracle which is nowhere to be found.

    Comment out that line re-run no problems reported.


    Back to my home to try the irb again

    ~/irb
    >require 'active_record'

    same error about ClassInheritableAttributes


    ARGHHHH!!!!

    I now see that /usr/local/lib/site_ruby/1.8 contains an
    active_record.rb and a active_record dir.

    Basically I ended up copying everything under
    /usr/share/rails/active*/lib/ to it's corresponding folder in
    /usr/local/lib/site_ruby/1.8 .

    Now everything seems to work fine. Though by the time I got the
    require statement to return true, it was bed time.

    Are other Debian users having these same problems? If so any advice on
    how to mange this stuff? Or, am I doing something wrong?


    TIA
    --
    Thomas G. Willis
    http://paperbackmusic.net
    Tom Willis, Mar 16, 2005
    #1
    1. Advertising

  2. On Thu, 17 Mar 2005 00:08:32 +0900, Tom Willis <> wrote:
    > Is anyone else struggling with Ruby on Debian unstable (or as I like
    > to call it, Red Hat Stable :))? It seems to me that Debians Package
    > management is fighting with Gems, but I don't know enough about Ruby
    > to know for sure, or what the correct way of doing things is.
    >
    > I wanted to play with ActiveRecord last night, and I assumed I had
    > Rails installed because
    >
    > #gem install rails --remote
    >
    > reported no problems, and a few days later the same version showed up
    > in apt so I Installed it from there as well. Maybe this was a mistake
    > I don't know.
    >


    <snip>

    > Are other Debian users having these same problems? If so any advice on
    > how to mange this stuff? Or, am I doing something wrong?
    >
    > TIA
    > --
    > Thomas G. Willis
    > http://paperbackmusic.net
    >
    >


    I haven't had any problems since I came to the understanding that
    Debian doesn't install a very large initial base of ruby programs.

    -Rich
    Richard Lyman, Mar 16, 2005
    #2
    1. Advertising

  3. Raphael Bauduin, Mar 16, 2005
    #3
  4. Tom,

    > Is anyone else struggling with Ruby on Debian unstable (or as I like
    > to call it, Red Hat Stable :))?


    As per RubyGems, I think you are misuderstanding some usage. I have
    active_record install ONLY via gems:
    % ruby -e "require 'active_record'; puts true"
    -e:1:in `require': No such file to load -- active_record (LoadError)
    from -e:1
    BUT:
    % ruby -r rubygems -e "require 'active_record'; puts true"
    true

    Basically, just put a "require 'rubygems'" in your code. There are
    other ways to handle this.
    See the rubygem docs
    http://docs.rubygems.org/read/chapter/3#page70

    > It seems to me that Debians Package
    > management is fighting with Gems, but I don't know enough about Ruby
    > to know for sure, or what the correct way of doing things is.


    I wouldn't use both apt-get and rubygems to install the same packages.
    It's easy to not use the rubygem ones by skipping the rubygems
    require, but I'm not sure how well the debian ruby libs are packaged.
    There has been some .. controversy .. about this.

    Cameron
    Cameron McBride, Mar 16, 2005
    #4
  5. Tom Willis

    Tom Willis Guest

    On Thu, 17 Mar 2005 02:09:47 +0900, Raphael Bauduin
    <> wrote:
    > Richard Lyman wrote:
    > > On Thu, 17 Mar 2005 00:08:32 +0900, Tom Willis <> wrote:
    > >

    >
    > >
    > > I haven't had any problems since I came to the understanding that
    > > Debian doesn't install a very large initial base of ruby programs.

    >
    > Btw, this seems to be changing from a changelog I saw this morning:
    > http://packages.debian.org/changelogs/pool/main/r/ruby1.8/ruby1.8_1.8.2-3/changelog
    >
    > Raph
    >
    > >
    > > -Rich
    > >
    > >

    >
    >


    Good to know Thanks.

    I was hoping someone could clarify where gems puts stuff as compared
    to apt. Also, it seemed like part of my original problem was that gem
    claimed to have installed what I asked it to, but did not. Or am I not
    done after #gem install something --remote , Or maybe it was just a
    fluke and the source of the problem was that missing
    active_record/connection_adapters/oracle_adapter.rb that the
    install.rb referenced that caused the whole thing to bomb.

    Nonetheless, I'm happy to have had access to the source so I can patch
    locally if necessary with no threat of being slapped with some silly
    DMCA violation.

    GO OpenSource!!!!!

    --
    Thomas G. Willis
    http://paperbackmusic.net
    Tom Willis, Mar 16, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Walzer

    Re: PIL (etc etc etc) on OS X

    Kevin Walzer, Aug 1, 2008, in forum: Python
    Replies:
    4
    Views:
    374
    Fredrik Lundh
    Aug 13, 2008
  2. Luke Kenneth Casson Leighton
    Replies:
    0
    Views:
    457
    Luke Kenneth Casson Leighton
    Dec 31, 2008
  3. Michael Schuerig

    Debian: coexistence of debs and gems?

    Michael Schuerig, May 4, 2005, in forum: Ruby
    Replies:
    4
    Views:
    120
    Michael Schuerig
    May 5, 2005
  4. pedro mg

    gems on Debian

    pedro mg, Jun 14, 2007, in forum: Ruby
    Replies:
    2
    Views:
    89
    Bas van Gils
    Jun 14, 2007
  5. Peter Hoang
    Replies:
    1
    Views:
    107
    David Masover
    Aug 4, 2008
Loading...

Share This Page