Run Multiple Rails Servers at the Same Time

It's annoying to shut down and start up your Rails server when jumping between projects. Learn how to run multiple servers at the same time.

If you jump between multiple Rails projects frequently, you probably get annoyed shutting down servers and starting them up again, and shutting them down, and starting them up again.

You start your Rails server like so (as I'm sure you know):

$ bundle exec rails s

That makes your application available at http://localhost:3000.

Additionally, you can run another Rails server from another project on a different port by passing it the -p argument. Let's say we want to start the server on port 3001.

$ bundle exec rails s -p 3001

Now this application is available at http://localhost:3001.

Alternatively, check out Pow. I love the concept of it, but I ran into too many issues and just went back to the old-school, command line approach.

Let's Connect

Keep Reading

Disable Rake Commands in a Rails Project

Sometimes you want to disable some of the default rake tasks in a rails project. Here's a quick way to do just that.

May 15, 2015

Big Oops: Just a Few (Old) Notifications

I've learned a few things the hard way. How to properly use Active Record callbacks with Ruby on Rails is one of those things.

Jun 15, 2020

A has_many Relationship within a Single Model in Rails

Here are a couple methods for dealing with uni-directional many-to-many associations in Rails.

Apr 04, 2015