i need to run Rails server on Ubuntu machine with different port number(i.e-8888
) for all time.So please help me what should the correct command to run this server.I am using Rails version 4.2.0 and i want to run this server for ever.
Asked
Active
Viewed 183 times
-3

satya
- 3,508
- 11
- 50
- 130
-
1possible duplicate of [How to change Rails 3 server default port in develoment?](http://stackoverflow.com/questions/3842818/how-to-change-rails-3-server-default-port-in-develoment) – Mihai Dinculescu Sep 09 '15 at 11:32
1 Answers
2
You can just use -p
option to specify the port number:
rails server -p 8888
You can even make an alias: rails s='rails server -p 8888'
and put it in the .zshrc
or .bashrc
so that every time you run rails server
it will use port 8888

K M Rakibul Islam
- 33,760
- 12
- 89
- 110