Forum: Ruby on Rails starting webrick from ruby (tar2rubyscript.rb)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3d333b0012928f3dd5a6861cb09ad683?d=identicon&s=25 Kris Leech (Guest)
on 2006-03-03 11:37
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 Veenstra'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.
3d333b0012928f3dd5a6861cb09ad683?d=identicon&s=25 Kris Leech (Guest)
on 2006-03-03 11:42
Doh,


ARGV.unshift("--port=1234")
ARGV.unshift("webrick")
load "script/server"


works!

Kris Leech 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 Veenstra'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.
This topic is locked and can not be replied to.