keyongtech


  keyongtech > ruby > 06/2008

 #1  
06-10-08, 09:10 AM
Martin DeMello
I've recently switched distributions to ubuntu, and I'm having
problems getting webby up and running. (I suspect this a general
problem with gems that need to install executables). I ran gem install
webby, and it installed happily enough into
/var/lib/gems/1.8/gems/webby-0.8.4/, but didn't install the webby
executable anywhere in path. I checked for an ubuntu package, but
there wasn't one. Of course, I could simply install it all by hand,
but that seems like the wrong thing to do - I'd rather figure out how
to get my gems playing nicely with ubuntu.

ruby -v: ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]
gem -v: 0.9.4
/etc/lsb-release:DISTRIB_CODENAME=hardy

martin
 #2  
06-10-08, 09:51 AM
David Masover
On Tuesday 10 June 2008 03:10:20 Martin DeMello wrote:
> I've recently switched distributions to ubuntu, and I'm having
> problems getting webby up and running. (I suspect this a general
> problem with gems that need to install executables). I ran gem install
> webby, and it installed happily enough into
> /var/lib/gems/1.8/gems/webby-0.8.4/, but didn't install the webby
> executable anywhere in path.


Check /var/lib/gems/1.8/bin -- and you may want to add that to your path.
 #3  
06-10-08, 01:59 PM
Leslie Viljoen
On Tue, Jun 10, 2008 at 10:51 AM, David Masover <ninja> wrote:
> On Tuesday 10 June 2008 03:10:20 Martin DeMello wrote:
>> I've recently switched distributions to ubuntu, and I'm having
>> problems getting webby up and running. (I suspect this a general
>> problem with gems that need to install executables). I ran gem install
>> webby, and it installed happily enough into
>> /var/lib/gems/1.8/gems/webby-0.8.4/, but didn't install the webby
>> executable anywhere in path.

>
> Check /var/lib/gems/1.8/bin -- and you may want to add that to your path.


My webby executable ended up in /usr/bin/webby. I installed gems via the
deb package (wajig install rubygems).

I have Ubuntu 8.04

Les
 #4  
06-10-08, 03:47 PM
miles.sterrett
On Jun 10, 4:10 am, Martin DeMello <martindeme> wrote:
> I've recently switched distributions to ubuntu, and I'm having
> problems getting webby up and running. (I suspect this a general
> problem with gems that need to install executables). I ran gem install
> webby, and it installed happily enough into
> /var/lib/gems/1.8/gems/webby-0.8.4/, but didn't install the webby
> executable anywhere in path. I checked for an ubuntu package, but
> there wasn't one. Of course, I could simply install it all by hand,
> but that seems like the wrong thing to do - I'd rather figure out how
> to get my gems playing nicely with ubuntu.
>
> ruby -v: ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]
> gem -v: 0.9.4
> /etc/lsb-release:DISTRIB_CODENAME=hardy
>
> martin


I am running Ubuntu 8.04. I installed RubyGems from source. I just
installed webby, and it placed an executable file in /usr/bin.

Incidentally, it is acceptable, if not recommended, to install
RubyGems from source. Because RubyGems can update itself, you can run
into issues with both apt/aptitude/Synaptic and RubyGems trying to
update RubyGems.

It may be advantageous for you to post the results of 'echo $PATH' and
'sudo find / -name "webby"'.

Good luck.

MilesZS
 #5  
06-10-08, 05:14 PM
Martin DeMello
On Tue, Jun 10, 2008 at 7:49 AM, miles.sterrett
<miles.sterrett> wrote:
>
> I am running Ubuntu 8.04. I installed RubyGems from source. I just
> installed webby, and it placed an executable file in /usr/bin.


The apt-got rubygems placed the executable in /var/lib/gems/1.8/bin/,
which it does seem to have done for all my other gems as well.

> Incidentally, it is acceptable, if not recommended, to install
> RubyGems from source. Because RubyGems can update itself, you can run
> into issues with both apt/aptitude/Synaptic and RubyGems trying to
> update RubyGems.


Thanks, will try that.

martin
 #6  
06-10-08, 05:15 PM
Martin DeMello
On Tue, Jun 10, 2008 at 1:51 AM, David Masover <ninja> wrote:
> On Tuesday 10 June 2008 03:10:20 Martin DeMello wrote:
>> I've recently switched distributions to ubuntu, and I'm having
>> problems getting webby up and running. (I suspect this a general
>> problem with gems that need to install executables). I ran gem install
>> webby, and it installed happily enough into
>> /var/lib/gems/1.8/gems/webby-0.8.4/, but didn't install the webby
>> executable anywhere in path.

>
> Check /var/lib/gems/1.8/bin -- and you may want to add that to your path.


Thanks, that was it :)

martin
 #7  
06-10-08, 05:16 PM
Martin DeMello
On Tue, Jun 10, 2008 at 5:59 AM, Leslie Viljoen <leslieviljoen> wrote:
>
> My webby executable ended up in /usr/bin/webby. I installed gems via the
> deb package (wajig install rubygems).


Thanks for the pointer to wajig! I tried uninstalling and reinstalling
webby and gems, just in case it had done something wrong the first
time, but still no /usr/bin installs. But adding the gem bin directory
to path works for me.

martin
 #8  
06-10-08, 06:02 PM
David Masover
On Tuesday 10 June 2008 09:49:55 miles.sterrett wrote:

> Incidentally, it is acceptable, if not recommended, to install
> RubyGems from source. Because RubyGems can update itself, you can run
> into issues with both apt/aptitude/Synaptic and RubyGems trying to
> update RubyGems.


However, if I install RubyGems from apt, all gems are entirely contained
in /var/lib/gems. It provides a nice conceptual break between the package
managers -- gems go here, apt gets everything else.

The solution here is fairly simple: I don't ever tell RubyGems to update
itself, or any part of Ruby which is installed via apt. However, I do use
RubyGems to install everything else, rather than using the libfoo-ruby
packages.

It would be nice to have an Ubuntu repository autogenerated from gems, though.
Even this cleanly separated, I don't like having two package managers.
 #9  
06-10-08, 07:10 PM
Eric Hodel
On Jun 10, 2008, at 07:49 AM, miles.sterrett wrote:
> On Jun 10, 4:10 am, Martin DeMello <martindeme> wrote:
>
> I am running Ubuntu 8.04. I installed RubyGems from source. I just
> installed webby, and it placed an executable file in /usr/bin.
>
> Incidentally, it is acceptable, if not recommended, to install
> RubyGems from source. Because RubyGems can update itself, you can run
> into issues with both apt/aptitude/Synaptic and RubyGems trying to
> update RubyGems.


I don't recommend installing RubyGems from source over a package.
Choose whichever makes you most comfortable.

I do recommend only continuing to upgrade RubyGems however you
initially installed it. Upgrading RubyGems via `gem update --system`
instead of through the packager you installed it with may lead to
undesired behavior.
 #10  
06-10-08, 08:01 PM
Leslie Viljoen
On Tue, Jun 10, 2008 at 8:10 PM, Eric Hodel <drbrain> wrote:
> On Jun 10, 2008, at 07:49 AM, miles.sterrett wrote:
>
> I don't recommend installing RubyGems from source over a package. Choose
> whichever makes you most comfortable.
>
> I do recommend only continuing to upgrade RubyGems however you initially
> installed it. Upgrading RubyGems via `gem update --system` instead of
> through the packager you installed it with may lead to undesired behavior.


Oh? Perhaps 'gem update --system' should check if it was installed via Apt
and refuse to update then. Not realising the danger here, I have updated gem
in exactly this way quite a few times.

I haven't noticed any problems but I suppose if I tried to cleanly remove gem
with apt things would break? Actually I have been running and updating apt in
this way since two Ubuntu releases ago, and have done two Ubuntu upgrades
in between without noticing any problems!


Les
 #11  
06-10-08, 08:49 PM
Eric Hodel
On Jun 10, 2008, at 12:01 PM, Leslie Viljoen wrote:
> On Tue, Jun 10, 2008 at 8:10 PM, Eric Hodel <drbrain>
> wrote:
>
> Oh? Perhaps 'gem update --system' should check if it was installed
> via Apt
> and refuse to update then. Not realising the danger here, I have
> updated gem
> in exactly this way quite a few times.


This would have to work for every packaged RubyGems. I don't know of
a way to do that so it wouldn't break somewhere.

> I haven't noticed any problems but I suppose if I tried to cleanly
> remove gem
> with apt things would break? Actually I have been running and
> updating apt in
> this way since two Ubuntu releases ago, and have done two Ubuntu
> upgrades
> in between without noticing any problems!



Last I looked, apt RubyGems changes the default gem repository by hard-
coding a path. Updating would cause gems to "disappear" because
RubyGems would switch back to the default path.
 #12  
06-10-08, 09:02 PM
Leslie Viljoen
On Tue, Jun 10, 2008 at 9:49 PM, Eric Hodel <drbrain> wrote:
> On Jun 10, 2008, at 12:01 PM, Leslie Viljoen wrote:
>
> This would have to work for every packaged RubyGems. I don't know of a way
> to do that so it wouldn't break somewhere.
>>

> Last I looked, apt RubyGems changes the default gem repository by
> hard-coding a path. Updating would cause gems to "disappear" because
> RubyGems would switch back to the default path.


Ah, now that I think about it I have noticed that sort of thing happening!
This explains so much!

Surely update --system could at least say "warning, if you did not
install Rubygems from
source, this is not a safe operation. Continue?"

Les
 #13  
06-10-08, 10:54 PM
Eric Hodel
On Jun 10, 2008, at 13:02 PM, Leslie Viljoen wrote:
> On Tue, Jun 10, 2008 at 9:49 PM, Eric Hodel <drbrain>
> wrote:
>
> Surely update --system could at least say "warning, if you did not
> install Rubygems from source, this is not a safe operation. Continue?"


Hrm, I will consider it.
 #14  
06-10-08, 11:31 PM
Tom Cloyd
Eric Hodel wrote:
> On Jun 10, 2008, at 13:02 PM, Leslie Viljoen wrote:
>
> Hrm, I will consider it.
>Yeah, SOMETHING needs to be done about this mess. For the perpetual

amateurs among us, it is simply too much to ask to remember what to do
about this problem, in the long gaps between the times we have to think
about it at all.

I know that I have NOT updated rubygems precisely because I have yet to
find the time to backtrack to figure out exactly how I need to do it,
and I don't want to screw up and break things and be unable to use
rubygems at all. I'm too busy actually getting needful work done. Sigh.

Tom
 #15  
06-11-08, 12:17 AM
Martin DeMello
On Tue, Jun 10, 2008 at 3:31 PM, Tom Cloyd <tomcloyd> wrote:
>
> I know that I have NOT updated rubygems precisely because I have yet to find
> the time to backtrack to figure out exactly how I need to do it, and I don't
> want to screw up and break things and be unable to use rubygems at all. I'm
> too busy actually getting needful work done. Sigh.


Ironically, I switched to Ubuntu because I needed to get useful work
done rather than endlessly fighting with my wireless card :) You win
some, you lose some.

martin
Similar Threads
Can't uninstall gems on Ubuntu

Hello, I installed net-ssh gem from normal account, and got such warnings: $ gem install net-ssh WARNING: Installing to ~/.gem since /usr/lib/ruby/gems/1.8 and /usr/bin...

Zlib Error in ubuntu while installing new gems

Hi, After installing the rubygems 1.3.1, I face the following issues while installing new gems. Error: arun@mysystem:~/Desktop$ sudo gem install...

Error with gems 1.2.0 on ubuntu hardy

First I apologize my poor English. After to install the ruby 1.8.7 patch level 22 on ubuntu 8.04 hardy succefully.Then I tryed to install rubygems 1.2 in sequence and...

on ubuntu, ruby can't find the gems

I'm working on Ubuntu 7.10, which presumably does things the Debian way. I have loaded several gems without apparent problem, and I see them sitting there in...

Webby, Gems and Paths

I am running an Ubuntu box, and it seems that whenever I "gem install" something with an executable (eg. /var/lib/gems/1.8/gems/webby-0.7.2/bin/webby) - I have to make a link...


All times are GMT. The time now is 01:30 AM. | Privacy Policy