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

T

Tom Willis

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
 
R

Richard Lyman

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.

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

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
 
C

Cameron McBride

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
 
T

Tom Willis

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

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!!!!!
 

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