Starting webrick from ruby (tar2rubyscript.rb)

I am using tar2rubyscript to package up a rails application and run it
as one file from the server.

If you run script/server and have lighttpd install it will start lighty
instead of webrick. So, thanks to Erik V.'s suggestion, I add
ARGV.unshift(“webrick”) to the init.rb file to force webrick to start:

ARGV.unshift(“webrick”)
load “script/server”

How would I then specify the port for webrick to listen to?

I tried adding another ARGV.unshift("–port=1234") but it didnt work.

Cheers Kris.

PS. I realise webrick is not a production server, I just want to get it
working first and then try lighty.

Doh,

ARGV.unshift("–port=1234")
ARGV.unshift(“webrick”)
load “script/server”

works!

Kris L. wrote:

I am using tar2rubyscript to package up a rails application and run it
as one file from the server.

If you run script/server and have lighttpd install it will start lighty
instead of webrick. So, thanks to Erik V.'s suggestion, I add
ARGV.unshift(“webrick”) to the init.rb file to force webrick to start:

ARGV.unshift(“webrick”)
load “script/server”

How would I then specify the port for webrick to listen to?

I tried adding another ARGV.unshift("–port=1234") but it didnt work.

Cheers Kris.

PS. I realise webrick is not a production server, I just want to get it
working first and then try lighty.