-3

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.

satya
  • 3,380
  • 7
  • 42
  • 119
  • 1
    possible 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 Answers1

1

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
  • 32,672
  • 12
  • 85
  • 105