Connect to Windows Share using Ruby

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

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

Aldric G. 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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs