My Profile Photo

rubycoloredglasses


I'm Jason, a web applications developer in the San Francisco Bay area.


Ruby on Rails

Back to Cheat Sheets

Generate New Rails App

# Generate for API only
rails new my_app --api

# Using MySQL database
rails new_my_app --database=mysql

# Using PostgreSQL database
rails new my_app --database=postgresql

# Without Turbolinks
rails new my_app --skip-turbolinks

# Without JavaScript
rails new my_app --skip-javascript
rails new my_app -J

# Without Sprockets
rails new my_app --skip-sprockets
rails new my_app -S

# Without Tests
rails new my_app --skip-test

# Don't run Bundle Install
rails new my_app --skip-bundle

# Preconfigure for app-like JavaScript with Webpack (options: react/vue/angular)
rails new my_app --webpack=WEBPACK

# Preconfigure for Vue with Webpack
rails new my_app --webpack=vue

Rake Tasks

# Display Rails routing table
rake routes