Open up the terminal. The terminal application on macOS is an operating system command line. Just wanted to let people know that if you're running a 32 bit ruby on a 64 bit windows, RUBYPLATFORM will show you that architecture is 32 bit. – max Nov 26 '14 at 6:06 1 RUBYPLATFORM will return 'java' when using JRuby, regardless the OS. – robertodecurnex Dec 3 '14 at 18:53.
We're going to install sqlite3 from homebrew because we can't use the built-in version with macOS Sierra without running into some troubles.
Rails ships with sqlite3 as the default database. Chances are you won't want to use it because it's stored as a simple file on disk. You'll probably want something more robust like MySQL or PostgreSQL.
There is a lot of documentation on both, so you can just pick one that seems like you'll be more comfortable with.
If you're new to Ruby on Rails or databases in general, I strongly recommend setting up PostgreSQL.
If you're coming from PHP, you may already be familiar with MySQL.
You can install MySQL server and client from Homebrew:
Once this command is finished, it gives you a couple commands to run. Follow the instructions and run them:
By default the mysql user is root
with no password.
When you're finished, you can skip to the Final Steps.
You can install PostgreSQL server and client from Homebrew:
Once this command is finished, it gives you a couple commands to run. Follow the instructions and run them:
By default the postgresql user is your current OS X username with no password. For example, my OS X user is named chris
so I can login to postgresql with that username.
Here you can get the latest Ruby distributions in your favorite flavor.The current stable version is 3.0.1.Please be sure to read Ruby’s License.
We have several tools on each major platform to install Ruby:
See the Installation page for details on usingpackage management systems or third-party tools.
Of course, you can also install Ruby from source on all major platforms.
Installing from the source code is a great solution for when you arecomfortable enough with your platform and perhaps need specific settingsfor your environment. It’s also a good solution in the event that thereare no other premade packages for your platform.
See the Installation page for details on buildingRuby from source. If you have an issue compiling Ruby, consider usingone of the third party tools mentioned above. They may help you.
ruby_3_0
branch.ruby_2_7
branch.ruby_2_6
branch.For more information about specific releases, particularly older releasesor previews, see the Releases page.Information about the current maintenance status of the variousRuby branches can be found on the Branches page.
For information about the Ruby Subversion and Git repositories, see ourRuby Core page.
The Ruby source is available from a worldwide set ofMirror Sites.Please try to use a mirror that is near you.