Gems (1.3.0) not visible from ruby (1.8.7)

J

Joni Niemi

Hi,

I'm trying to sftp into another server using net-sftp, but the gems I
install are not visible to ruby interpreter.

I've installed the net-sftp gem, and it shows fine in gem listing (see
below), but when I try to run a script, the library is not found (see
below).

Any help would be highly appreciated!

Cheers, Joni
--
E.g. my script file begins with:

require 'net/sftp'

*** LOCAL GEMS ***

builder (2.1.2)
linecache (0.43)
net-scp (1.0.1)
net-sftp (2.0.1)
net-ssh (2.0.4)
net-ssh-gateway (1.0.0)
net-ssh-multi (1.0.0)
ruby-debug-base (0.10.2, 0.10.0)
rubygems-update (1.3.0)
ruby myscript.rb
myscript.rb:1:in `require': no such file to load -- net/sftp (Loa
dError)
from myscript.rb:1
gem environment
D:\dev\engineerize\Reaper\lib>d:\ruby\ruby1.8.7\bin\gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.0
- RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [i386-mswin32]
- INSTALLATION DIRECTORY: D:/ruby/ruby1.8.7/lib/ruby/gems/1.8
- RUBY EXECUTABLE: D:/ruby/ruby1.8.7/bin/ruby.exe
- EXECUTABLE DIRECTORY: D:/ruby/ruby1.8.7/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-mswin32-60
- GEM PATHS:
- D:/ruby/ruby1.8.7/lib/ruby/gems/1.8
- D:/MyDocuments/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org/
 
G

Gregory Brown

Hi,

I'm trying to sftp into another server using net-sftp, but the gems I
install are not visible to ruby interpreter.

I've installed the net-sftp gem, and it shows fine in gem listing (see
below), but when I try to run a script, the library is not found (see
below).

Any help would be highly appreciated!

Cheers, Joni

It should begin with

require "rubygems"
 
K

Ken Bloom

Hi,

I'm trying to sftp into another server using net-sftp, but the gems I
install are not visible to ruby interpreter.

I've installed the net-sftp gem, and it shows fine in gem listing (see
below), but when I try to run a script, the library is not found (see
below).

Any help would be highly appreciated!

Cheers, Joni
--
E.g. my script file begins with:

require 'net/sftp'


*** LOCAL GEMS ***

builder (2.1.2)
linecache (0.43)
net-scp (1.0.1)
net-sftp (2.0.1)
net-ssh (2.0.4)
net-ssh-gateway (1.0.0)
net-ssh-multi (1.0.0)
ruby-debug-base (0.10.2, 0.10.0)
rubygems-update (1.3.0)

myscript.rb:1:in `require': no such file to load -- net/sftp (Loa
dError)
from myscript.rb:1

You need to
require 'rubygems'
first.

--Ken
 
J

Joni Niemi

Thanks, Ken and Gregory, that worked like a dream! I somehow missed the
bit in the docs...

Cheers,

Joni
n00b :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top