A
Alex Gore
when i try to start webrick i get this message
/easyhtmlserver:12: syntax error, unexpected tASSOC, expecting kEND
ort => 80
^
/easyhtmlserver:14: syntax error, unexpected tASSOC, expecting kEND
ort => 801
^
/easyhtmlserver:11: warning: found = in conditional, should be ==
/easyhtmlserver:16: syntax error, unexpected tSYMBEG, expecting ')'
ocumentRoot => "/home/" + $home + "/easyhtml/" + $pro
^
/easyhtmlserver:17: syntax error, unexpected ')', expecting kEND
/easyhtmlserver:28: syntax error, unexpected $end, expecting kEND
this is my code
#!/usr/bin/env ruby
#require the libaries
require 'webrick'
include WEBrick
#make the class
class EasyHTMLServer
def initalize
s = HTTPServer.new(
if $port = 80
ort => 80
else
ort => 801
end
ocumentRoot => "/home/" + $home + "/easyhtml/" + $pro
)
end
end
#declare the varibles
$home = ARGV[0]
$pro = ARGV[1]
$port = ARGV[2]
#load the server
EasyHTMLServer.new
/easyhtmlserver:12: syntax error, unexpected tASSOC, expecting kEND
ort => 80
^
/easyhtmlserver:14: syntax error, unexpected tASSOC, expecting kEND
ort => 801
^
/easyhtmlserver:11: warning: found = in conditional, should be ==
/easyhtmlserver:16: syntax error, unexpected tSYMBEG, expecting ')'
ocumentRoot => "/home/" + $home + "/easyhtml/" + $pro
^
/easyhtmlserver:17: syntax error, unexpected ')', expecting kEND
/easyhtmlserver:28: syntax error, unexpected $end, expecting kEND
this is my code
#!/usr/bin/env ruby
#require the libaries
require 'webrick'
include WEBrick
#make the class
class EasyHTMLServer
def initalize
s = HTTPServer.new(
if $port = 80
ort => 80
else
ort => 801
end
ocumentRoot => "/home/" + $home + "/easyhtml/" + $pro
)
end
end
#declare the varibles
$home = ARGV[0]
$pro = ARGV[1]
$port = ARGV[2]
#load the server
EasyHTMLServer.new