Reputation: 12789
[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")
Upvotes: 19
Views: 21397
Reputation: 47482
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
Upvotes: 25
Reputation: 6415
If you wanted to run on port 3001, add this bash script:
#!/bin/bash
rails server -p 3001
Upvotes: 1