How to start WEBrick in a different port than 3000
Asked Answered
S

2

19
[2011-09-11 06:14:12] INFO  WEBrick::HTTPServer#start: pid=32723 port=3000

How to start WEBrick in a different port than 3000, is there a way to specify this information in a config file instead of the command line argument ("-p")

Surcease answered 12/9, 2011 at 9:55 Comment(3)
I haven't seen a config file for WEBric. But you can always create small script that starts the server on the port you want and check the script in your source control repository.Offer
Check this out nearinfinity.com/blogs/chris_rohr/…Macropterous
Please check this. #3843318Locomotion
Y
25

Use -p parameter

For Rails 2

ruby script/server -p3001

and for w/o command line ref this

EDITED For Rails 3

rails s -p3001
Younker answered 12/9, 2011 at 10:53 Comment(0)
R
1

If you wanted to run on port 3001, add this bash script:

 #!/bin/bash
 rails server -p 3001
Racon answered 12/9, 2011 at 10:57 Comment(1)
Whoops! Missed that part. Changed.Racon

© 2022 - 2024 — McMap. All rights reserved.