DEV Community

Cover image for How to create a new Rails app running Rails 7.1 beta or main branch
Lucian Ghinda
Lucian Ghinda

Posted on • Originally published at allaboutcoding.ghinda.com

How to create a new Rails app running Rails 7.1 beta or main branch

New app with Rails 7.1.beta1

Here is how to create a new Rails app that runs on Rails 7.1 beta1

gem install -v 7.1.0.beta1 rails

rails _7.1.0.beta1_ new myrails71app
Enter fullscreen mode Exit fullscreen mode

Replace myrails71app with your own app name and you are good to go.

This will generate a Gemfile that has something like this inside and then install required gems for Rails 7.1.0.beta1

# Gemfile

gem "rails", "~> 7.1.0.beta1"
Enter fullscreen mode Exit fullscreen mode

New app with Rails main branch

Here is how to create a new Rails app that runs on Rails main branch from GitHub:

rails new myrailsapp --main
Enter fullscreen mode Exit fullscreen mode

This will generate a Gemfile that has something like this inside:

gem "rails", github: "rails/rails", branch: "main"
Enter fullscreen mode Exit fullscreen mode

May you have a lot of ideas to try!


Enjoyed this article?

Join my Short Ruby News newsletter for weekly Ruby updates from the community. For more Ruby learning resources, visit rubyandrails.info. You can also find me on Ruby.social or Linkedin

Top comments (2)

Collapse
 
edenwheeler profile image
Eden Wheeler

Thanks for sharing this. It will be helpful in my recent project. Ruby On Rails Course

Collapse
 
lucianghinda profile image
Lucian Ghinda

I am glad you found this helpful!