DEV Community

Germán Alberto Gimenez Silva
Germán Alberto Gimenez Silva

Posted on • Originally published at rubystacknews.com on

What Happens When You Forget to Add a Parameter When Creating a Rails Project?

March 17, 2025

Have you ever created a new Rails project only to realize you forgot to add a crucial parameter at the beginning? We’ve all been there! The rails new command is the first step when starting a new project, and making the right choices from the start can save you a lot of time and effort down the road.


Do you want to start a new Rails project from scratch and don’t know how? Get in touch 👉 https://rubystacknews.com/get-in-touch/


Understanding rails new

When you run rails new, you can specify multiple options to customize your project setup. These options help define the database, skip unnecessary files, and tailor the project to your specific needs.

To see all available options, you can run:

rails new --help 
Enter fullscreen mode Exit fullscreen mode

Commonly Used Parameters

1. Choosing the Database

By default, Rails uses SQLite, but you can specify another database:

rails new my_app -d postgresql
Enter fullscreen mode Exit fullscreen mode

Other supported databases include MySQL, Oracle, SQL Server, and more.

2. Skipping Unnecessary Features

You can skip certain features if you don’t need them:

rails new my_app --skip-action-mailer --skip-active-storage --skip-test
Enter fullscreen mode Exit fullscreen mode

Other options include:

  • –skip-action-mailbox: Skip Action Mailbox.
  • –skip-action-text: Skip Action Text.
  • –skip-active-record: Skip Active Record (no database).
  • –skip-active-job: Skip Active Job.
  • –skip-action-cable: Skip Action Cable.
  • –skip-sprockets: Skip Sprockets (asset pipeline).
  • –skip-spring: Don’t install Spring.
  • –skip-turbolinks: Skip Turbolinks.
  • –skip-bootsnap: Skip Bootsnap.

3. API-Only Mode

If you’re building an API, you can create a lightweight project:

rails new my_api --api
Enter fullscreen mode Exit fullscreen mode

This removes unnecessary middleware and views.

4. JavaScript and CSS Choices

Rails supports different JavaScript and CSS frameworks:

rails new my_app -j esbuild --css tailwind
Enter fullscreen mode Exit fullscreen mode
  • –javascript=[importmap|webpack|esbuild|rollup]: Choose JavaScript bundler.
  • –css=[tailwind|bootstrap|bulma|postcss|sass|none]: Choose a CSS framework.

5. Skipping Git Initialization

If you don’t want Rails to initialize a Git repository automatically:

rails new my_app --skip-git
Enter fullscreen mode Exit fullscreen mode

6. Skipping Bundle Install

If you want to install gems later:

rails new my_app --skip-bundle
Enter fullscreen mode Exit fullscreen mode

7. Using Edge Rails

To use the latest Rails version from GitHub:

rails new my_app --edge
Enter fullscreen mode Exit fullscreen mode

8. Forcing Overwrite

If the directory for your app already exists, you can overwrite it:

rails new my_app --force
Enter fullscreen mode Exit fullscreen mode

9. Custom Templates

Use a custom application template to generate your app:

rails new my_app -m path/to/template.rb
Enter fullscreen mode Exit fullscreen mode

10. Docker Support (Experimental)

Generate a Rails app with Docker support:

rails new my_app --docker
Enter fullscreen mode Exit fullscreen mode

What If You Forget a Parameter?

If you forgot to add a parameter, you don’t need to start over! Here’s how to adjust your project after creation:

  • Change Database: Update config/database.yml and install the necessary gems.
  • Add Missing Gems: Manually add the required gems to your Gemfile and run bundle install.
  • Enable Features: If you skipped something like Action Mailer, you can generate missing files using Rails generators.

Need Expert Ruby on Rails Developers to Elevate Your Project?

Fill out our form! >>


Need Expert Ruby on Rails Developers to Elevate Your Project?


Full Example of a Custom Rails Setup

rails new my_api \
  --api \
  -d postgresql \
  -j esbuild \
  --css tailwind \
  --skip-test \
  --skip-active-storage \
  --skip-action-mailer \
  --skip-git
Enter fullscreen mode Exit fullscreen mode

This creates:

  • An API-only app.
  • Uses PostgreSQL as the database.
  • Configures ESBuild for JavaScript.
  • Uses Tailwind CSS for styling.
  • Skips unnecessary features (tests, Active Storage, Action Mailer).
  • Does not initialize a Git repository.

Final Thoughts

The rails new command is your first step in building a great application. Taking the time to customize it properly can make a huge difference. Next time you start a Rails project, double-check your parameters to ensure a smooth setup!

Have you ever forgotten an important parameter when creating a Rails project? Share your experiences in the comments! 🚀

Playwright CLI Flags Tutorial

5 Playwright CLI Flags That Will Transform Your Testing Workflow

  • 0:56 --last-failed: Zero in on just the tests that failed in your previous run
  • 2:34 --only-changed: Test only the spec files you've modified in git
  • 4:27 --repeat-each: Run tests multiple times to catch flaky behavior before it reaches production
  • 5:15 --forbid-only: Prevent accidental test.only commits from breaking your CI pipeline
  • 5:51 --ui --headed --workers 1: Debug visually with browser windows and sequential test execution

Learn how these powerful command-line options can save you time, strengthen your test suite, and streamline your Playwright testing experience. Click on any timestamp above to jump directly to that section in the tutorial!

Watch Full Video 📹️

Top comments (0)

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

👋 Kindness is contagious

DEV is better (more customized, reading settings like dark mode etc) when you're signed in!

Okay