Question

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?

Was it helpful?

Solution

using the ` key you can send OS commands.

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

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top