views:

16

answers:

2

I am writing an XML file in rails(running on RHEL) and will then need to post this file across to a windows share.

Sambala was installed so that we can SMB to the share, but after running some test code I get the error: uninitialized constant ApplicationController::Sambala

samba = Sambala.new(  :domain   =>  'myDOMAIN',
                      :host     =>  'myHOST',
                      :share    =>  'mySHARE',
                      :user     =>  'myUSER',
                      :password =>  'myPASSWORD')

    samba.cd('mySHARE')   # =>  true
    samba.put(:from => 'aLocalFile.txt')

Is there a better way to connect to a windows share using rails on RHEL? or do I need to include a reference to sambala somewhere?

A: 

You can usual just mount the Windows drive on the OS level, no need to use something so direct. If you lack admin privileges, you should be able to use FUSE to do what you want.

tadman
It's possible to do it on an OS level, but the owners of the share would prefer that we connect only when we are placing a file.
inKit
A: 

using the ` key you can send OS commands.

`mount -t cifs //server/share -o username=USERNAME,password=PASSWORD /directoryToMount`
inKit