Forum: Ruby Connect to Windows Share using Ruby

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
65cbfc5b88399df0999fbc9e1b32452d?d=identicon&s=25 Nick Hoffman (hoffmannick)
on 2008-11-12 16:49
Hello,

I'm looking to connect to a Windows share using Ruby.  Is there a
library, or gem that would help me do this?  Just a nudge in the right
direction would be great.  Thank you!
795512576c8ea79062dbbab8044d5269?d=identicon&s=25 Howard Roberts (hroberts)
on 2008-11-13 00:23
Nick Hoffman wrote:
> Hello,
>
> I'm looking to connect to a Windows share using Ruby.  Is there a
> library, or gem that would help me do this?  Just a nudge in the right
> direction would be great.  Thank you!

Nick,
  http://rubysmb.sourceforge.net/ may do the trick for you, if you mean
connecting to Windows from Linux, and have Samba already configured.

HTH,
Howard
76d5176f2419e5984d7680d1951c0b5e?d=identicon&s=25 Aldric Giacomoni (Guest)
on 2008-11-13 05:40
(Received via mailing list)
I couldn't find the original post so I'll reply to this one..

require 'fileutils' # optional, but so much stuff comes in handy...
Dir.chdir("//servername/sharename/")

That usually does the trick for me.. Or do you need something else?

--Aldric
65cbfc5b88399df0999fbc9e1b32452d?d=identicon&s=25 Nick Hoffman (hoffmannick)
on 2008-11-13 15:46
Aldric Giacomoni wrote:
> I couldn't find the original post so I'll reply to this one..
>
> require 'fileutils' # optional, but so much stuff comes in handy...
> Dir.chdir("//servername/sharename/")
>
> That usually does the trick for me.. Or do you need something else?
>
> --Aldric

Yeah, all of the above works for me.  I just didn't know if there was a
more 'built in' way to connect rather than relying on the host OS to
handle the communication.  Having Ruby take care of it would make the
code much more portable.
This topic is locked and can not be replied to.