[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")
Go to your browser and open http://localhost:3000, you will see a basic Rails app running. You can also use the alias "s" to start the server: bin/rails s . The server can be run on a different port using the -p option.
One way to shut down a rogue server is with the kill command. For the PID output above, you could kill the corresponding stuck server using kill 42612 . And if that didn't work, you could try kill -9 42612 .
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
If you wanted to run on port 3001, add this bash script:
#!/bin/bash
rails server -p 3001
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With