Skip to content
Poignant Guide Ruby Q&A

How do I create my first Rails app with rails new?

Asked by Ngozi A. · Rails and web development2 repliesupdated

Short answer

My client project is on an older Rails, so I want a clean practice app on a current version where I can break things. I read three tutorials and they disagree: one says rails new, one says bundle exec rails new, one starts with bin/rails and never explains the difference.

Written by Ngozi A. ·
CitePoignant Guide Ruby Q&A, "How do I create my first Rails app with rails new?", https://poignantguide.net/answers/read/how-do-i-create-my-first-rails-app-with-rails-new/, accessed 2026-12-04.
  1. Member ·

    This is what I did on Ubuntu, with Ruby from rbenv:

    $ ruby -v
    ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [x86_64-linux]
    $ gem install rails
    $ rails new store
    ...
             run  bundle install
    Bundle complete! 14 Gemfile dependencies, 70 gems now installed.
    $ cd store
    

    It printed a very long list of create lines and then it stopped, so I do not know if it finished. I opened http://localhost:3000 in the browser and got "This site can't be reached".

    What am I supposed to run next? Why bin/rails inside the app but plain rails outside? And which Ruby version does a new Rails app need? I want to understand the steps rather than paste a bunch of commands, so I can do it again for the client.

    0
    ReplyLink

Plain text or simple Markdown. Links are nofollow. Your email is never shown.

  1. Dmitri V.Member ·

    Create the app in a clean directory, not inside another git repo. rails new makes its own repository, and nested repos give you strange behaviour later. Also commit once right after generating, so you can always diff against the untouched starting point.

  2. Kai N.Member ·

    @Dmitri V. small addition from the agency: I also run bin/rails --help once in a new app. It lists the commands that exist in that version, which is faster than hunting through tutorials.

Poignant Guide Ruby Q&A. Questions and answers on learning Ruby and programming: syntax, blocks, objects, gems, Rails, debugging and reading the Poignant Guide.