[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Gems (1.3.0) not visible from ruby (1.8.7

Joni Niemi

10/20/2008 2:49:00 PM

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'

>gem list

*** 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.ruby...
--
Posted via http://www.ruby-....

5 Answers

Gregory Brown

10/20/2008 4:07:00 PM

0

On Mon, Oct 20, 2008 at 10:49 AM, Joni Niemi <joni.niemi@vtt.fi> wrote:
> 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'

It should begin with

require "rubygems"


--
Technical Blaag at: http://blog.majesticseacr... | Non-tech
stuff at: http://metametta.bl...

Ken Bloom

10/20/2008 4:24:00 PM

0

On Mon, 20 Oct 2008 09:49:04 -0500, Joni Niemi wrote:

> 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'
>
>>gem list
>
> *** 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

You need to
require 'rubygems'
first.

--Ken


--
Chanoch (Ken) Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu...

Joni Niemi

10/21/2008 6:35:00 AM

0

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

Cheers,

Joni
n00b :-)
--
Posted via http://www.ruby-....

Rick Rothstein \(MVP - VB\)

7/30/2009 3:13:00 PM

0

Try this...

Sub SelectColumnB()
Intersect(Range("Description"), ActiveCell.EntireRow).Select
End Sub

--
Rick (MVP - Excel)


"A & S" <stephanie.kanouse@gmail.com> wrote in message
news:309b9225-fef8-4ad7-b8af-9a1eb4a520af@k1g2000yqf.googlegroups.com...
On Jul 29, 2:17 pm, "Rick Rothstein"
<rick.newsNO.S...@NO.SPAMverizon.net> wrote:
> Just so you can see there are usually more than one way to accomplish a
> goal
> with code, here is another approach...
>
> Sub SelectColumnB()
> Intersect(Columns("B"), ActiveCell.EntireRow).Select
> End Sub
>
> --
> Rick (MVP - Excel)
>
> "A & S" <stephanie.kano...@gmail.com> wrote in
> messagenews:bb3d7976-b974-40d4-bd5f-0fb02728c4fc@d32g2000yqh.googlegroups.com...
> On Jul 29, 1:31 pm, Lars-?ke Aspelin <lar...@REMOOOVE.telia.com>
> wrote:
>
>
>
>
>
> > On Wed, 29 Jul 2009 10:24:03 -0700 (PDT), "A & S"
>
> > <stephanie.kano...@gmail.com> wrote:
> > >Hi
>
> > >I have been messing around for several hours to try and figure out how
> > >to do this but can never get quite what I want. I need to be able to
> > >run the macro and have it select a cell by using the row of the
> > >current active cell and column B. say for instance cell D5 is active,
> > >I would want the macro to select cell B5, if F15 were active then I
> > >would want it to select B15.
>
> > >Any help would be appreciated.
>
> > >Thank
>
> > Try this macro
>
> > Sub select_B()
> > ActiveSheet.Cells(ActiveCell.Row, "B").Select
> > End Sub
>
> > Hope this helps / Lars-?ke
>
> thanks that worked just like I wanted, I knew it had to be something
> fairly simple- Hide quoted text -
>
> - Show quoted text -

I am now wondering, I highlighted the entire column B and typed
Description into the name box is there a way that I can use that
title
instead of B

thanks

Lori

7/30/2009 4:05:00 PM

0

You can also just type into the name box one of these:
"c2 r" or "Description r" or "index(description,row())"

The equivalent in VBA is: application.goto "Description r" , etc.
An advantage is that you can use the macro recorder to generate the code.

"A & S" wrote:

> On Jul 29, 1:31 pm, Lars-??ke Aspelin <lar...@REMOOOVE.telia.com>
> wrote:
> > On Wed, 29 Jul 2009 10:24:03 -0700 (PDT), "A & S"
> >
> > <stephanie.kano...@gmail.com> wrote:
> > >Hi
> >
> > >I have been messing around for several hours to try and figure out how
> > >to do this but can never get quite what I want. I need to be able to
> > >run the macro and have it select a cell by using the row of the
> > >current active cell and column B. say for instance cell D5 is active,
> > >I would want the macro to select cell B5, if F15 were active then I
> > >would want it to select B15.
> >
> > >Any help would be appreciated.
> >
> > >Thank
> >
> > Try this macro
> >
> > Sub select_B()
> > ActiveSheet.Cells(ActiveCell.Row, "B").Select
> > End Sub
> >
> > Hope this helps / Lars-??ke
>
> I am now wondering, I highlighted the entire column B and typed
> Description into the name box is there a way that I can use that title
> instead of B
>
> thanks
>