This will take about 30 minutes. We will be setting up a Ruby on Rails development environment on macOS 10.14 Mojave. Older versions of OS X are mostly compatible so follow along as far as you can and then Google search for any problems you run into. 3 Mac OS X comes with a version of Ruby preinstalled; check the version by typing ruby -version at the command prompt: $ ruby -version ruby 2.0.0p481 (2014-05-08 revision 45883) universal.x8664-darwin14 In this example, the version of Ruby is 2.0.0, and the number following the letter p is the current patch or build number. Jekyll can be installed on Mac, Windows, Ubuntu. Here is how to install jekyll only on Mac and Windows, because we mainly use it on Mac and Windows. There is difference only in Ruby installation between Mac and Windows, other process is same. If you wanna get more info, you can check jekyll homepage. Current blog use the following version. In this post, we’re going to show you how to install Ruby on your Mac. Along the way, we’ll learn about the steps involved and various bits of knowledge required to get up and going. So if you’re totally new, don’t worry! I’ll list each step and follow it with an “extra credit” section where I’ll explain that step in depth.
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.
jekyll can be installed on Mac, Windows, Ubuntu. Here is how to install jekyll only on Mac and Windows, because we mainly use it on Mac and Windows.
There is difference only in Ruby installation between Mac and Windows, other process is same. If you wanna get more info, you can check jekyll homepage.
current blog use the following version.
ruby 2.5.1p57
jekyll 3.7.3
jekyll is one of Ruby Gem, so we need to install Ruby.
If you installed Ruby, you can install jekyll Gem by using Ruby.
You can create jekyll project by jekyll new [project name]
command
Open a browser and access to http://127.0.0.1:4000
recently, I’ve installed jekyll and set my jekyll blog in the new Mac. however, after installing jekyll, when I installed the plugins with gem install
command, I got an error and couldn’t install them. I searched and knew some plugins use Java. after installing Java, I could install successfully. if you got an error when you install the plugins, check Java is installed.
Was my blog helpful? Please leave a comment at the bottom. it will be a great help to me!