require net/ssh gem and korundum

Discussion in 'Ruby' started by Bauduin Raphael, Jan 1, 2005.

  1. Hi,

    I've installed korundum(KDE bindings) manually and net/ssh as a gem
    (just upgraded rubygems to 0.8.4).

    Here are the require lines I have:

    require 'Korundum'
    require 'tailWindow'
    require 'sshtail' #generated with rbuic
    require 'rubygems' #generated with rbuic
    require 'net/ssh'

    Everything works as long as I don't require net/ssh. The last require
    gives me this error:

    /usr/local/lib/site_ruby/1.8/rubygems.rb:263:in `const_missing':
    uninitialized constant KDE::Config::CONFIG (NameError)
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:263:in `default_dir'
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:86:in `dir'
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:248:in `set_paths'
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:97:in `path'
    from
    /usr/local/lib/site_ruby/1.8/rubygems/loadpath_manager.rb:54:in
    `build_paths'
    from
    /usr/local/lib/site_ruby/1.8/rubygems/loadpath_manager.rb:68:in
    `search_gempath'
    from
    /usr/local/lib/site_ruby/1.8/rubygems/loadpath_manager.rb:4:in `require'
    from ./tail.rb:7


    I can use net/ssh in another script, so its installation is fine. Is
    there a problem because I use a manually installed lib and a gem in the
    same script?

    Raph
     
    Bauduin Raphael, Jan 1, 2005
    #1
    1. Advertisements

  2. Bauduin Raphael

    Richard Dale Guest

    Bauduin Raphael wrote:

    > Hi,
    >
    > I've installed korundum(KDE bindings) manually and net/ssh as a gem
    > (just upgraded rubygems to 0.8.4).
    >
    > Here are the require lines I have:
    >
    > require 'Korundum'
    > require 'tailWindow'
    > require 'sshtail' #generated with rbuic
    > require 'rubygems' #generated with rbuic
    > require 'net/ssh'
    >
    > Everything works as long as I don't require net/ssh. The last require
    > gives me this error:
    >
    > /usr/local/lib/site_ruby/1.8/rubygems.rb:263:in `const_missing':
    > uninitialized constant KDE::Config::CONFIG (NameError)
    > from /usr/local/lib/site_ruby/1.8/rubygems.rb:263:in
    > `default_dir' from /usr/local/lib/site_ruby/1.8/rubygems.rb:86:in
    > `dir' from /usr/local/lib/site_ruby/1.8/rubygems.rb:248:in
    > `set_paths' from /usr/local/lib/site_ruby/1.8/rubygems.rb:97:in
    > `path' from
    > /usr/local/lib/site_ruby/1.8/rubygems/loadpath_manager.rb:54:in
    > `build_paths'
    > from
    > /usr/local/lib/site_ruby/1.8/rubygems/loadpath_manager.rb:68:in
    > `search_gempath'
    > from
    > /usr/local/lib/site_ruby/1.8/rubygems/loadpath_manager.rb:4:in `require'
    > from ./tail.rb:7
    >
    >
    > I can use net/ssh in another script, so its installation is fine. Is
    > there a problem because I use a manually installed lib and a gem in the
    > same script?

    I tried it and got the same error. Then I moved the rubygems require to
    before the Korundum one and it worked ok though:

    require 'rubygems'
    require_gem 'net-ssh'

    require 'Korundum'
    ....

    I haven't actually tried calling methods in the net-ssh package though, so
    there still might be incompatibility problems.

    -- Richard
     
    Richard Dale, Jan 2, 2005
    #2
    1. Advertisements

  3. Richard Dale wrote:
    > Bauduin Raphael wrote:
    >
    >
    >>Hi,
    >>
    >>I've installed korundum(KDE bindings) manually and net/ssh as a gem
    >>(just upgraded rubygems to 0.8.4).
    >>
    >>Here are the require lines I have:
    >>
    >>require 'Korundum'
    >>require 'tailWindow'
    >>require 'sshtail' #generated with rbuic
    >>require 'rubygems' #generated with rbuic
    >>require 'net/ssh'
    >>
    >>Everything works as long as I don't require net/ssh. The last require
    >>gives me this error:
    >>
    >>/usr/local/lib/site_ruby/1.8/rubygems.rb:263:in `const_missing':
    >>uninitialized constant KDE::Config::CONFIG (NameError)
    >> from /usr/local/lib/site_ruby/1.8/rubygems.rb:263:in
    >> `default_dir' from /usr/local/lib/site_ruby/1.8/rubygems.rb:86:in
    >> `dir' from /usr/local/lib/site_ruby/1.8/rubygems.rb:248:in
    >> `set_paths' from /usr/local/lib/site_ruby/1.8/rubygems.rb:97:in
    >> `path' from
    >>/usr/local/lib/site_ruby/1.8/rubygems/loadpath_manager.rb:54:in
    >>`build_paths'
    >> from
    >>/usr/local/lib/site_ruby/1.8/rubygems/loadpath_manager.rb:68:in
    >>`search_gempath'
    >> from
    >>/usr/local/lib/site_ruby/1.8/rubygems/loadpath_manager.rb:4:in `require'
    >> from ./tail.rb:7
    >>
    >>
    >>I can use net/ssh in another script, so its installation is fine. Is
    >>there a problem because I use a manually installed lib and a gem in the
    >>same script?

    >
    > I tried it and got the same error. Then I moved the rubygems require to
    > before the Korundum one and it worked ok though:
    >
    > require 'rubygems'
    > require_gem 'net-ssh'
    >
    > require 'Korundum'
    > ...
    >
    > I haven't actually tried calling methods in the net-ssh package though, so
    > there still might be incompatibility problems.
    >


    Seems to work indeed. Not sure I'll continue with the gem though...

    Raph


    > -- Richard
     
    Bauduin Raphael, Jan 2, 2005
    #3
    1. Advertisements

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. loial
    Replies:
    0
    Views:
    576
    loial
    Feb 10, 2009
  2. Michael Glaesemann

    gem query finds gem, yet require fails

    Michael Glaesemann, Nov 12, 2006, in forum: Ruby
    Replies:
    5
    Views:
    358
    Michael Glaesemann
    Nov 26, 2006
  3. Austin 7873
    Replies:
    5
    Views:
    413
    Eric Hodel
    Jan 27, 2007
  4. Daniel Berger
    Replies:
    2
    Views:
    279
    Daniel Berger
    Sep 12, 2008
  5. chutsu
    Replies:
    1
    Views:
    228
    chutsu
    Sep 3, 2009
  6. Tench Johnson
    Replies:
    1
    Views:
    510
    Biff Tannen
    Apr 23, 2010
  7. salamond

    net/ssh in ruby. ssh.exec fails

    salamond, Feb 17, 2011, in forum: Ruby
    Replies:
    0
    Views:
    487
    salamond
    Feb 17, 2011
  8. Replies:
    0
    Views:
    452
Loading...