Spencer Cooley
Spencer Cooley

Reputation: 8851

Starting rails server for different apps

If I am working on two different rails apps (app_one, app_two), how does the rails server work when I switch from working on app_one to working on app_two? Does app_two show up in a different port? When I go to localhost:3000 it keeps showing app_one. I tried closing all of my terminals and then rebooting the rails server from the app_two root directory, but I still get app_one at localhost:3000

Upvotes: 1

Views: 363

Answers (1)

Yule
Yule

Reputation: 9764

When starting your server you can specify a port:

rails s -p 3000 #rails 3 server starting on port 3000 (default)
rails s -p 3001 #rails 3 server starting on port 3001

or for rails 2:

script/server -p 3000
script/server -p 3001

Then you can switch between the two at will

Upvotes: 2

Related Questions