S
Svend-Erik Kjær Madsen
Hi
I just cant figure out how to use ACL in my first attempt to write a little
DRb server.
My code:
<SNIP>
require 'drb'
acl = ACL.new( %w[deny all
allow 192.168.1.*
allow localhost ] )
DRb.install_acl(acl)
class LogFileServer
def readlog
logf = File.open("/var/log/apache/error.log")
return logf.read
logf.close
rescue
return "Do some error handling"
end
end
myFirstServer = LogFileServer.new
DRb.start_service('druby://localhost:9000', myFirstServer)
DRb.thread.join
</SNIP>
Produces:
server.rb:3: uninitialized constant ACL (NameError)
If i let out all the acl stuff, it works out fine.
Do I miss something, for "ACL.new" to work, or do I place the code wrong ?
I just cant figure out how to use ACL in my first attempt to write a little
DRb server.
My code:
<SNIP>
require 'drb'
acl = ACL.new( %w[deny all
allow 192.168.1.*
allow localhost ] )
DRb.install_acl(acl)
class LogFileServer
def readlog
logf = File.open("/var/log/apache/error.log")
return logf.read
logf.close
rescue
return "Do some error handling"
end
end
myFirstServer = LogFileServer.new
DRb.start_service('druby://localhost:9000', myFirstServer)
DRb.thread.join
</SNIP>
Produces:
server.rb:3: uninitialized constant ACL (NameError)
If i let out all the acl stuff, it works out fine.
Do I miss something, for "ACL.new" to work, or do I place the code wrong ?