"gem NAME, VERSION" && "require NAME" fails due to version conflict

Discussion in 'Ruby' started by Iñaki Baz Castillo, Feb 27, 2011.

  1. Hi, I must be missing something very obvious but I don't get it. I
    just want to use nokogiri 1.4.3:

    ~# gem list | grep nokogiri
    nokogiri (1.4.4, 1.4.3)

    ~# irb
    irb> gem "nokogiri", "=3D1.4.3"
    true
    irb> Nokogiri
    NameError: uninitialized constant Object::Nokogiri
    irb> require "nokogiri"
    Gem::LoadError: can't activate nokogiri (=3D 1.4.4, runtime) for [],
    already activated nokogiri-1.4.3 for []


    How is supposed it to work? I know that "require_gem" is deprecated
    (removed in fact).
    I use gem 1.3.7.


    Thanks a lot.

    --=20
    I=C3=B1aki Baz Castillo
    <>
     
    Iñaki Baz Castillo, Feb 27, 2011
    #1
    1. Advertising

  2. Iñaki Baz Castillo

    Ryan Davis Guest

    Re: "gem NAME, VERSION" && "require NAME" fails due to versionconflict

    On Feb 27, 2011, at 09:00 , I=F1aki Baz Castillo wrote:

    > Hi, I must be missing something very obvious but I don't get it. I
    > just want to use nokogiri 1.4.3:
    >=20
    > ~# gem list | grep nokogiri
    > nokogiri (1.4.4, 1.4.3)
    >=20
    > ~# irb
    > irb> gem "nokogiri", "=3D1.4.3"
    > true
    > irb> Nokogiri
    > NameError: uninitialized constant Object::Nokogiri
    > irb> require "nokogiri"
    > Gem::LoadError: can't activate nokogiri (=3D 1.4.4, runtime) for [],
    > already activated nokogiri-1.4.3 for []


    10002 % gem list nokogiri
    nokogiri (1.4.4, 1.4.1)
    10003 % irb
    >> require "rubygems"

    =3D> true
    >> gem "nokogiri", "=3D 1.4.1"

    =3D> true
    >> require "nokogiri"

    =3D> true
    >> Nokogiri

    =3D> Nokogiri
    10004 % gem -v
    1.5.3
     
    Ryan Davis, Feb 28, 2011
    #2
    1. Advertising

  3. Re: "gem NAME, VERSION" && "require NAME" fails due to versionconflict

    2011/2/28 Ryan Davis <>:
    >> ~# gem list | grep nokogiri
    >> nokogiri (1.4.4, 1.4.3)
    >>
    >> ~# irb
    >> irb> gem "nokogiri", "=3D1.4.3"
    >> true
    >> irb> Nokogiri
    >> NameError: uninitialized constant Object::Nokogiri
    >> irb> require "nokogiri"
    >> Gem::LoadError: can't activate nokogiri (=3D 1.4.4, runtime) for [],
    >> already activated nokogiri-1.4.3 for []

    >
    > 10002 % gem list nokogiri
    > nokogiri (1.4.4, 1.4.1)
    > 10003 % irb
    >>> require "rubygems"

    > =3D> true
    >>> gem "nokogiri", "=3D 1.4.1"

    > =3D> true
    >>> require "nokogiri"

    > =3D> true
    >>> Nokogiri

    > =3D> Nokogiri
    > 10004 % gem -v
    > 1.5.3


    Same fails in my system with RubyGem 1.3.7. Note however that I'm
    using the gem command provided by the Debian/Ubuntu package. I will
    check upgrading to 1.5.3.

    Thanks.

    --=20
    I=C3=B1aki Baz Castillo
    <>
     
    Iñaki Baz Castillo, Feb 28, 2011
    #3
  4. Re: "gem NAME, VERSION" && "require NAME" fails due to versionconflict

    2011/2/28 I=C3=B1aki Baz Castillo <>:
    >> 10002 % gem list nokogiri
    >> nokogiri (1.4.4, 1.4.1)
    >> 10003 % irb
    >>>> require "rubygems"

    >> =3D> true
    >>>> gem "nokogiri", "=3D 1.4.1"

    >> =3D> true
    >>>> require "nokogiri"

    >> =3D> true
    >>>> Nokogiri

    >> =3D> Nokogiri
    >> 10004 % gem -v
    >> 1.5.3

    >
    > Same fails in my system with RubyGem 1.3.7. Note however that I'm
    > using the gem command provided by the Debian/Ubuntu package. I will
    > check upgrading to 1.5.3.



    Annoying, I get the very same error with Gem 1.5.3:


    ~# gem list nokogiri
    nokogiri (1.4.4, 1.4.3)

    irb(main):002:0> require "rubygems"
    true

    irb(main):003:0> gem "nokogiri", "=3D1.4.3"
    true

    irb(main):004:0> require "nokogiri"
    Gem::LoadError: can't activate nokogiri (=3D 1.4.4, runtime) for [],
    already activated nokogiri-1.4.3 for []

    ~# gem -v
    1.5.3

    --=20
    I=C3=B1aki Baz Castillo
    <>
     
    Iñaki Baz Castillo, Feb 28, 2011
    #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. aljodo
    Replies:
    3
    Views:
    3,071
    Peter Blum
    Aug 26, 2005
  2. Mumbai Joe
    Replies:
    0
    Views:
    604
    Mumbai Joe
    Jul 29, 2003
  3. Brian J. Sayatovic
    Replies:
    1
    Views:
    984
    Chris Uppal
    Jun 25, 2004
  4. Fresh
    Replies:
    2
    Views:
    638
    Bo Persson
    Apr 22, 2008
  5. charles cashion

    css conflict (or html conflict)

    charles cashion, Feb 18, 2009, in forum: HTML
    Replies:
    2
    Views:
    795
    charles cashion
    Feb 18, 2009
Loading...

Share This Page