gem installations getting Killed

Discussion in 'Ruby' started by Phil Tomson, Nov 1, 2004.

  1. Phil Tomson

    Phil Tomson Guest

    I just set up my laptop with Debian (via Knoppix - very easy, BTW) and
    got Ruby 1.8.2 loaded via apt-get (and a few more libs and packages
    that were required such as irb and libyaml-ruby - why isn't there a
    Debian Ruby package that just includes most of this stuff? - sorry
    differnt topic).

    Next I downloaded and installed ruby-gems.

    After this I tried using gem to install net-ssh and I got:

    # gem install net-ssh
    Attempting local installation of 'net-ssh'
    Local gem file not found: net-ssh*.gem
    Attempting remote installation of 'net-ssh'
    Successfully installed net-ssh, version 0.1.0
    Installing RDoc documentation for net-ssh-0.1.0...
    Killed

    What's with the 'Killed'?

    I then tried installing session just to see if it might be a problem with
    net-ssh:

    # gem install session
    Attempting local installation of 'session'
    Local gem file not found: session*.gem
    Attempting remote installation of 'session'
    Successfully installed session, version 2.1.9
    Installing RDoc documentation for session-2.1.9...


    That seemed to work OK, but when I try to require 'session', it's not
    found:

    # irb
    irb(main):001:0> require 'session'
    LoadError: No such file to load -- session
    from (irb):1:in `require'
    from (irb):1
    irb(main):002:0>



    Phil
    Phil Tomson, Nov 1, 2004
    #1
    1. Advertising

  2. Phil Tomson wrote:
    > ...
    > Next I downloaded and installed ruby-gems.
    >
    > After this I tried using gem to install net-ssh and I got:
    >
    > I then tried installing session just to see if it might be a problem with
    > net-ssh:
    >
    > # gem install session
    > Attempting local installation of 'session'
    > Local gem file not found: session*.gem
    > Attempting remote installation of 'session'
    > Successfully installed session, version 2.1.9
    > Installing RDoc documentation for session-2.1.9...
    >
    >
    > That seemed to work OK, but when I try to require 'session', it's not
    > found:
    >
    > # irb
    > irb(main):001:0> require 'session'
    > LoadError: No such file to load -- session
    > from (irb):1:in `require'
    > from (irb):1
    > irb(main):002:0>
    >


    With gems you need to

    require 'rubygems'

    before

    require 'session'

    for some reason.
    I guess the point is, that this way rubygems is able to install a
    missing gem.

    What I don't like as much is that I have to think whether I installed
    something as a gem or not. I'd rather my ruby installation would find a
    gem-installed file even without 'require "rubygems"' (although I might
    not have the additional service of installing/updating missing and/or
    outdated gems during runtime).

    Happy rubying

    Stephan
    Stephan Kämper, Nov 1, 2004
    #2
    1. Advertising

  3. Stephan Kämper ha scritto:


    > With gems you need to
    >
    > require 'rubygems'
    >
    > before
    >
    > require 'session'
    >
    > for some reason.
    > I guess the point is, that this way rubygems is able to install a
    > missing gem.


    the reason is that rubygems uses require_gem to load a gem with a
    specific version, and that method is not built in.

    >
    > What I don't like as much is that I have to think whether I installed
    > something as a gem or not. I'd rather my ruby installation would find a
    > gem-installed file even without 'require "rubygems"' (although I might
    > not have the additional service of installing/updating missing and/or
    > outdated gems during runtime).


    see the latest announce. Something like setting RUBYOPT="rubygems"
    should be enough for you to get away ignoring if you're using gems or
    something else.
    gabriele renzi, Nov 1, 2004
    #3
  4. Phil Tomson

    Phil Tomson Guest

    In article <>,
    Stephan Kämper <> wrote:
    >Phil Tomson wrote:
    > > ...

    >
    >With gems you need to
    >
    > require 'rubygems'
    >
    >before
    >
    > require 'session'
    >
    >for some reason.
    >I guess the point is, that this way rubygems is able to install a
    >missing gem.


    Oh, right. For some reason I thought that you didn't have to require
    'rubygems' anymore.

    >
    >What I don't like as much is that I have to think whether I installed
    >something as a gem or not. I'd rather my ruby installation would find a
    >gem-installed file even without 'require "rubygems"' (although I might
    >not have the additional service of installing/updating missing and/or
    >outdated gems during runtime).


    Unfortuneatly, until rubygems is part of the Ruby distribution this will
    probably be the case.

    When running ruby you can say:
    $ ruby -rubygems foo.rb

    to have rubygems required before running your script (and you can create an
    alias so that this gets done for you).

    I just added "require 'rubygems'" to my .irbrc file.

    Phil
    Phil Tomson, Nov 1, 2004
    #4
    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. Mike O'Donnell
    Replies:
    0
    Views:
    569
    Mike O'Donnell
    Nov 19, 2003
  2. Austin 7873
    Replies:
    5
    Views:
    171
    Eric Hodel
    Jan 27, 2007
  3. Frew Schmidt

    Getting Gem Version from Within a Gem

    Frew Schmidt, Jul 10, 2007, in forum: Ruby
    Replies:
    10
    Views:
    208
    Ryan Davis
    Jul 11, 2007
  4. Xeno Campanoli
    Replies:
    1
    Views:
    67
    Phillip Gawlowski
    Dec 29, 2009
  5. Ralph Shnelvar
    Replies:
    2
    Views:
    86
    Charles Roper
    Sep 24, 2010
Loading...

Share This Page