Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Debian Poop...Gems/Rails etc...

Reply
Thread Tools

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

 
 
Tom Willis
Guest
Posts: n/a
 
      03-16-2005
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


 
Reply With Quote
 
 
 
 
Richard Lyman
Guest
Posts: n/a
 
      03-16-2005
On Thu, 17 Mar 2005 00:08:32 +0900, Tom Willis <(E-Mail Removed)> 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


 
Reply With Quote
 
 
 
 
Raphael Bauduin
Guest
Posts: n/a
 
      03-16-2005
Richard Lyman wrote:
> On Thu, 17 Mar 2005 00:08:32 +0900, Tom Willis <(E-Mail Removed)> 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/changelog....2-3/changelog

Raph

>
> -Rich
>
>

 
Reply With Quote
 
Cameron McBride
Guest
Posts: n/a
 
      03-16-2005
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


 
Reply With Quote
 
Tom Willis
Guest
Posts: n/a
 
      03-16-2005
On Thu, 17 Mar 2005 02:09:47 +0900, Raphael Bauduin
<(E-Mail Removed)> wrote:
> Richard Lyman wrote:
> > On Thu, 17 Mar 2005 00:08:32 +0900, Tom Willis <(E-Mail Removed)> 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/changelog....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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANN] Builds of PyWebkitGtk and Webkit-Glib-Gtk(r39359+#16401.master) for Debian i386,Debian AMD64 and Macports MacOSX 10.4 Luke Kenneth Casson Leighton Python 0 12-31-2008 08:23 PM
Firefox (Debian Linux) won't quit ANC Firefox 6 04-01-2006 03:17 PM
Interview with Martin F. Krafft, Author of "The Debian System" at XYZ Computing Silverstrand Front Page News 0 01-20-2006 02:48 AM
tacacs-plus help in debian ggs234@googlemail.com Cisco 1 11-25-2005 08:26 PM
[Debian] Upgrading to kernel 2.6 in Debian DUser NZ Computing 0 01-11-2004 12:38 AM



Advertisments