Rails Server & Console in Ruby

From the Ruby on Rails cheat sheet · Getting Started · verified Jul 2026

Rails Server & Console

Start development server and interactive console

bash
# Start development server
rails server
# or shorthand
rails s

# Specify port
rails s -p 3001

# Rails console
rails console
rails c
✅ Default server runs on localhost:3000
💡 Use rails c --sandbox to test without affecting database
🔍 reload! in console reloads code without restarting
⚡ rails server accepts same flags as rails s
serverconsoledevelopment

More Ruby tasks

Back to the full Ruby on Rails cheat sheet