How to install Rails 6.x on a Mac
We will use four different package managers to set up our environment. Homebrew is a package manager for Mac. We will use
brew to install
rbenv is a Ruby manager that makes it easy to install modern versions of the language. RubyGems is a package manager for Ruby that will help you install current versions of Rails.
Install Ruby using
Step 1 of this tutorial will help you install
Now that you've installed
rbenv, let's install Ruby and Rails.
rbenv install 2.7.1
*Tip: If you are unsure what version of Ruby to install, one suggestion is to research where you plan to deploy your app. For example, if you intend to launch your app on AWS, visit the Elasticbeanstalk Supported Platforms. Heroku also offers a list of supported runtimes to help reduce confusion.
Install Rails using
Using your specific version of Ruby, install Rails without documentation.
RBENV_VERSION=2.7.1 rbenv exec gem install rails --version 188.8.131.52 --no-document
Create Rails App
RBENV_VERSION=2.7.1 rbenv exec rails _184.108.40.206_ new [my_rails_app]