[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

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

Tom Willis

3/16/2005 3:09:00 PM

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://paperbac...


4 Answers

Richard Lyman

3/16/2005 4:31:00 PM

0

On Thu, 17 Mar 2005 00:08:32 +0900, Tom Willis <tom.willis@gmail.com> 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://paperbac...
>
>

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


Raphael Bauduin

3/16/2005 5:07:00 PM

0

Richard Lyman wrote:
> On Thu, 17 Mar 2005 00:08:32 +0900, Tom Willis <tom.willis@gmail.com> 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...

Raph

>
> -Rich
>
>

Cameron McBride

3/16/2005 5:14:00 PM

0

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/chapte...

> 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


Tom Willis

3/16/2005 5:19:00 PM

0

On Thu, 17 Mar 2005 02:09:47 +0900, Raphael Bauduin
<raphael.bauduin@be.easynet.net> wrote:
> Richard Lyman wrote:
> > On Thu, 17 Mar 2005 00:08:32 +0900, Tom Willis <tom.willis@gmail.com> 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...
>
> 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://paperbac...