The installation instructions are different, depending on your operating system; either Microsoft Windows, Mac OS X or Ubuntu Linux. Install R and RStudio on Windows My experience with Windows and R went from tragic to amazing.
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 for installing Ruby but ran into a few problems. Install Homebrew is a package manager for OS X. Open Terminal and install Homebrew with: $ ruby -e '$(curl -fsSkL raw.github.com/mxcl/homebrew/go)' Once the installation is successful, you can run the following command to check your environment. $ brew doctor Apparently, you should see: Your system is raring to brew But instead I had 3 warnings.
![Install mac os x tiger Install mac os x tiger](/uploads/1/2/5/4/125447171/310597946.png)
Warning: /usr/bin occurs before /usr/local/bin This means that system-provided programs will be used instead of those provided by Homebrew. The following tools exist at both paths: gcov-4.2 Consider amending your PATH so that /usr/local/bin occurs before /usr/bin in your PATH. 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.profile. 1 2 3 # Fix $PATH for homebrew homebrew =/usr/local/bin:/usr/local/sbin export PATH = $homebrew: $PATH Google tells me the other two warnings are related to Mono being installed and can be ignored. Warning: /Library/Frameworks/Mono.framework detected This can be picked up by CMake's build system and likely cause the build to fail. You may need to move this file out of the way to compile CMake. Warning: You have a non-Homebrew 'pkg-config' in your PATH: /usr/bin/pkg-config = /Library/Frameworks/Mono.framework/Versions/2.10.9/bin/pkg-config This was most likely created by the Mono installer.
`./configure` may have problems finding brew-installed packages using this other pkg-config. Ploughing on Install rbenv Rbenv handles the installation of multiple Ruby environments. $ brew update $ brew install rbenv $ brew install ruby-build Install gcc If I try to install Ruby immediately, I get ERROR: This package must be compiled with GCC, but ruby-build couldn't find a suitable `gcc` executable on your system. Please install GCC and try again.
XCode used to ship with a compatible gcc, but no longer does. We can install it with Homebrew.
$ brew update $ brew tap homebrew/dupes $ brew install autoconf automake apple-gcc42 The new gcc will coexist happily alongside the default one. Install Ruby 1.9.3 Now we can install Ruby.
$ rbenv install 1.9.3-p194 $ rbenv rehash Next run $ ruby -version Hmm I get ruby 1.8.7 (2012-02-08 patchlevel 358) universal-darwin12.0 Shouldn’t it say ruby 1.9.3? It turns out you need to add the following to the end of your.profile.profile.