Discover how to install and configure Ruby on Rails 6 on a Windows or Mac computer. This practical course covers everything you need to know to get Ruby on Rails, MySQL, and all of the supporting software up and running. Install Ruby with rbenv. I decided to setup Octopress on my Mac so that I can publish blog posts from either Windows or MacOS. I’m on OS X 10.8.2. I tried to follow the Octopress instructions for installing Ruby but ran into a few problems. Install Homebrew. Homebrew is a package manager for OS X. Open Terminal and install Homebrew with. Upgrade Your System to OS X Mavericks. Installing Ruby on Rails is simple, but unless you have an. We're going to use rbenv to install and manage our Ruby versions. To do this, run the following commands in your Terminal: brew install rbenv ruby-build # Add rbenv to bash so that it loads every time you open a terminal echo 'if which rbenv /dev/null; then eval '$(rbenv init -)'; fi' /.zshrc source /.zshrc # Install Ruby rbenv install 2. Install with: ruby setup.rb (you may need admin/root privilege) For more details and other options, see: ruby setup.rb -help. Status Uptime Code Data Discuss Stats Contribute About Help API Security. RubyGems.org is the Ruby community’s gem hosting service. Instantly publish your gems and then install.
Install Ruby with rbenv
I decided to setup Octopress on my Mac so that I can publish blog posts from either Windows or MacOS. I’m on OS X 10.8.2.
I tried to follow the Octopress instructions for installing Ruby but ran into a few problems.
Install Homebrew
Homebrew is a package manager for OS X. Open Terminal and install Homebrew with:
Once the installation is successful, you can run the following command to check your environment.
Apparently, you should see:
But instead I had 3 warnings.
This one can be fixed by modifying your .profile
file. Create it if it doesn’t already exist. Use nano ~/.profile
if you don’t have a preferred editor.
Google tells me the other two warnings are related to Mono being installed and can be ignored.
Ploughing on…
Install rbenv
Rbenv handles the installation of multiple Ruby environments.
Install gcc
If I try to install Ruby immediately, I get
XCode used to ship with a compatible gcc, but no longer does. We can install it with Homebrew.
The new gcc will coexist happily alongside the default one.
Install Ruby 1.9.3
Now we can install Ruby.
Next run
Hmm… I get
Shouldn’t it say ruby 1.9.3? It turns out you need to add the following to the end of your .profile
.
Ruby Mac Os
Now quit and restart Terminal.
Ruby For Mac
Ruby 1.9.3 is installed correctly. If I quit and restart Terminal, ruby --version
is still 1.9.3.