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. Advertising

  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. Advertising

  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. 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. Michael Glaesemann

    gem query finds gem, yet require fails

    Michael Glaesemann, Nov 12, 2006, in forum: Ruby
    Replies:
    5
    Views:
    141
    Michael Glaesemann
    Nov 26, 2006
  2. Austin 7873
    Replies:
    5
    Views:
    174
    Eric Hodel
    Jan 27, 2007
  3. Matthieu Riou

    Korundum and threads

    Matthieu Riou, Dec 13, 2007, in forum: Ruby
    Replies:
    4
    Views:
    84
    Joel VanderWerf
    Dec 13, 2007
  4. Daniel Berger
    Replies:
    2
    Views:
    145
    Daniel Berger
    Sep 12, 2008
  5. Replies:
    0
    Views:
    79
Loading...

Share This Page