You would need to install
rubybefore you can install rails.
Mac already comes with
ruby installed based on how recent your
macOS is? Depending on what
ruby version you want for your development, the best way to install
Ruby is to use RVM. In your terminal, type the command below listed in steps:
curl -sSL https://get.rvm.io | bash -s stable --ruby
Rails 3, best version to install is
rvm install 1.9.3 ruby -v #=> 1.9.3
rvm use 1.9.3 --default
Install Rails (this rails version requires ruby-version >=1.9.3)
gem install rails -v 220.127.116.11 rails -v #=> 18.104.22.168
rails new my_first_app #(this will install the app for you.) cd my_first_app rails s #(run the server)
Open the browser and type below in your
Message saying 'Welcome to rails' will be displayed or similar.