How to Install Ruby on a Mac
basix

How to Install Ruby on a Mac

Tutorial Details
  • Topic: Installing Ruby
  • Tools Required: Mac, Terminal, Internet Access

This one is tailor made for the Basix users among you. If you’ve been itching to try out Ruby and/or Rails, if the Terminal is somewhat new to you, you may find that even the process of installing it can generate countless confusing errors. This article will detail the exact steps you need to follow to get Ruby up and running on your Mac.


Step 1 – RVM

What you might be interested to know is that Ruby comes preinstalled on your Mac. Don’t believe me? Open the Terminal and type:

ruby -v

Likely, the version number will return 1.8.7. While you might be tempted to stick with that, you probably shouldn’t for a couple reasons:

  • Old versions of the OS shipped with a buggy version of Ruby
  • RVM provides the flexibility to use any version of Ruby that you require. Plus, if you’re just starting out with Ruby, don’t use an old version; you want 1.9.2!

These days, RVM is the way the cool kids install Ruby, and that’s what we’ll use.

“RVM lets you deploy each project with its own completely self-contained and dedicated environment–from the specific version of ruby, all the way down to the precise set of required gems to run your application. Having a precise set of gems also avoids the issue of version conflicts between projects, which can cause difficult-to-trace errors and hours of hair loss. “

Open the Terminal, and type:

$ \curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled # Or, --ruby=1.9.3

If an error is returned when you run this command, make sure that you have Git installed. Don’t worry, it’s easy to setup!


Step 2 – Load RVM into the Shell

Give that a few seconds to install, and next, we need to make RVM available to the shell. We’ll do this by updating our ~/.bash_profile file.

cd ~/
sudo vim .bash_profile

Note that we’re using Vim to update this file, which can be a bit confusing at first. Feel free to open this file in any code editor your prefer. Maybe you want to use mate .bash_profile. Also, note that, if this file does not exist, you should create it manually. Paste the following to the bottom of the page.

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"  # This loads RVM into a shell session.

If you’re using Vim, you’ll need to press i to switch into Insert Mode first. Once the line has been pasted, press Escape, and then :wq! to save and close the file. If you’re using a different code editor, then you know what to do!


Step 3 – Restart Terminal

Just to be safe, let’s restart Terminal to make sure that everything took effect. To ensure that RVM is correctly installed, type:

rvm

You should see a long list of commands that are available to you. Good job; that part is out of the way.


Step 4 – Download the Latest Version of Xcode

From my experiences, the biggest gotcha is when you try to install a new version of Ruby with RVM, and you’re met with a handful of confusing errors. Most of the time, this is the result of Apple’s Xcode not being installed on your system, or, if it is, not being the current version.

You can download Xcode from Apple’s App Store. Search for “xcode” and click the install button.

Download XCode

You might want to fix yourself some lunch, as this large file will take some time to download. Once it does, though, run the install process, and, when finished, close Xcode. You shouldn’t need to restart your computer, but, if it keeps you in the good graces of the church, go ahead and do so.


Step 5 – Download Ruby 1.9.2

Next, restart Terminal, and type:

rvm list known

You’ll see a long list of versions…

$ rvm list known
# MRI Rubies
1.8.6[-p420]
1.8.6-head
1.8.7[-p352]
1.8.7-head
1.9.1-p378
1.9.1[-p431]
1.9.1-head
1.9.2-p180
1.9.2[-p290]
1.9.2-head
ruby-head
...

For our needs, let’s install Ruby 1.9.2

rvm install 1.9.2

That shouldn’t take but a moment.

If you still receive an error at this point, leave a comment below with your error message, and the rest of us will help you debug it. But, before doing so, type: rvm notes to determine if you’ve forgotten to install any dependencies.

Once the installation has completed, we need to tell RVM which version of Ruby we currently want to use:

rvm use 1.9.2

Next, test it by checking the version number:

ruby -v

On my computer, this returns ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.1.0]. Good job, you’re now using Ruby 1.9.2. There’s just one last thing to deal with.


Step 6 – Make 1.9.2 the Default

If you restart Terminal, and type ruby -v again, you’ll likely find that it has defaulted back to the system version of Ruby: 1.8.7. That’s no good! Let’s be sure to make 1.9.2 the default.

rvm --default use 1.9.2

This bit is identical to what we did just a moment ago – the only difference being that we’ve specified that 1.9.2 should be the default.


Step 7 – Finished. Begin Installing Gems

And that’s it! You’re all set to go! If you’d like to experiment with Ruby’s syntax, type:

irb
2 + 2

The next step is to install any gems that you require. For example, if you want to work with Ruby on Rails:

gem install rails

Or possibly Sinatra:

gem install sinatra

Important: Note that I’m not using sudo to install these gems. This is a big no-no when working with RVM. From the official docs:

“When you do sudo you are running commands as root, another user in another shell and hence all of the setup that RVM has done for you is ignored while the command runs under sudo (such things as GEM_HOME, etc…). So to reiterate, as soon as you ‘sudo’ you are running as the root system user which will clear out your environment as well as any files it creates are not able to be modified by your user and will result in strange things happening. (You will start to think that someone has a voodoo doll of your application…)”


Conclusion

If this tutorial seemed incredibly easy to you, that’s because it wasn’t intended for you. Not everyone is comfortable with the command line, and not everyone installs Ruby without first being met with a huge crop of errors. Hopefully, this article will help a bit. And, again, if you’re still having trouble, leave a comment, and we’ll do our best to help you out!

Alternatively to RVM, you also might look into rbenv, which, though quite new, is quickly gaining popularity.

You Also Might Like…

Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • verpixelt

    I dont get it. It always tells me “rvm command not found” on step 3 ;(

    • John

      This tutorial is a little out of date… Its about a year old… I tried to follow this but it seems things have been updated.

      I deleted the .bash_profile file created in step 2

      To remove the .bash_profile file, do the following:

      cd ~/
      rm .bash_profile

      Type “y” and enter to confirm.

      And then ran:

      curl -L https://get.rvm.io | bash -s stable

      More on that at https://rvm.io/rvm/install/

      Then, restarted the Terminal and continued on. Please note that the newest version of Ruby is now 1.9.3.

      Substitute that instead of 1.9.2.

      Hope that helps!!

    • http://webdesignlift.com Windo

      The same happened to me, RVM not found, I’ll try John Instruction.

      FYI, I do want to update the default version 1.8.7 because I keep getting error using compass zurb-foundation 3 framework

      • http://www.webdesignlift.com windo

        Wow, apparently I keep getting error when installing 1.9.3 or other version as well.

        the problem is solved by opening xcode (if you installed already) go to Preferences > Downloads and install Command Line tools.

        go back to terminal

        rvm install 1.9.3 and it installed successfully

        note : I have downloaded osx-gcc but since I have xcode 4.3.3 installed in the system I chose to keep at it.

        Thanks

  • Brit

    Hello,

    When trying to install rvm 1.9.3, I get the following message:

    Before it happens, please read and execute the instructions below.
    Please use a separate terminal to execute any additional commands.

    Notes for Mac OS X 10.7.4, Xcode 4.3.2.

    For MacRuby: Install LLVM first.

    For JRuby: Install the JDK. See http://developer.apple.com/java/download/ # Current Java version “1.6.0_26″
    For IronRuby: Install Mono >= 2.6
    For Ruby 1.9.3: Install libksba # If using Homebrew, ‘brew install libksba’

    You can use & download osx-gcc-installer: https://github.com/kennethreitz/osx-gcc-installer
    ** NOTE: Currently, Node.js is having issues building with osx-gcc-installer. The only fix is to install Xcode over osx-gcc-installer.

    We had reports of http://hpc.sourceforge.net/ making things work, but it looks like not easiest/safest to setup.

    To use an RVM installed Ruby as default, instead of the system ruby:

    rvm install 1.8.7 # installs patch 357: closest supported version
    :

    I have Xcode already downloaded, which has LLVM I thought, so I’m not sure how to proceed?

    Thanks!!

    • Tessa Davis

      Did you find the solution to this? I am getting the same message and I’m not sure what to do…

  • http://www.webseopyme.com tatolc

    If you are getting this Error:
    —-
    Error running ‘ ./configure –prefix=/Users/xxx/.rvm/rubies/ruby-1.9.3-p125
    –enable-shared –disable-install-doc –with-libyaml
    –with-opt-dir=/Users/xxxx/.rvm/usr ‘,
    please read /Users/xxxx/.rvm/log/ruby-1.9.3-p125/configure.log
    There has been an error while running configure. Halting the installation.
    xxxxx-MacBook-Air:~ xxxxx$
    —–
    Try this solution:

    Downloading Xcode from the app store is not enough to install the command line tools.

    Once you have downloaded Xcode, open it, go to preferences >”downloads”. There is an “Install” link to add the “command line tools”.

    Once this has been completed, make sure to re-open your terminal window.

    • http://www.jorgeduarte.com Jorge Duarte Alvarez

      Thanks!

    • http://twitter.com/Lisaveta_K Лисавета Худякова

      Thanks a lot!

    • http://www.facebook.com/d1i1m1o1n Арефьев Дмитрий

      Thanks!

    • Ricardo Herrera

      Thanks!!! :D

    • I Ton

      Thanks very much!!

    • http://www.facebook.com/lofty78 Jon Russell

      thanks

  • http://emilien-pierru.com Emilien

    Hey there ! Nice tutorial !

    I tried to install the last version of Ruby, but I came across some errors :

    Error running ‘ ./configure –prefix=”/Users/emilien/.rvm/usr” ‘, please read /Users/emilien/.rvm/log/ruby-1.9.2-p320/yaml/configure.log”

    Error running ‘make ‘, please read /Users/emilien/.rvm/log/ruby-1.9.2-p320/yaml/make.log

    Error running ‘ ./configure –prefix=/Users/emilien/.rvm/rubies/ruby-1.9.2-p320 –enable-shared –disable-install-doc –with-libyaml –with-opt-dir=/Users/emilien/.rvm/usr ‘, please read /Users/emilien/.rvm/log/ruby-1.9.2-p320/configure.log
    There has been an error while running configure. Halting the installation.

    I have Xcode and Git installed, and reading the logs doesn’t help :x

    Do you have any idea ?

    Thanks a lot in advance ! ;)

  • http://emilien-pierru.com Emilien

    Find the answer in the last comments… Installing the “command line tools” in Xcode do the trick !

  • dattyle

    Everything worked fine until after Step 5, when I get:

    ruby-1.9.3-p194 – #downloading ruby-1.9.3-p194, this may take a while depending on your connection…
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 9610k 100 9610k 0 0 71514 0 0:02:17 0:02:17 –:–:– 44921
    ruby-1.9.3-p194 – #extracting ruby-1.9.3-p194 to /Users/dattyle/.rvm/src/ruby-1.9.3-p194
    ruby-1.9.3-p194 – #extracted to /Users/dattyle/.rvm/src/ruby-1.9.3-p194
    ruby-1.9.3-p194 – #configuring
    Error running ‘ ./configure –prefix=/Users/dattyle/.rvm/rubies/ruby-1.9.3-p194 –enable-shared –disable-install-doc –with-libyaml –with-opt-dir=/Users/dattyle/.rvm/usr ‘, please read /Users/dattyle/.rvm/log/ruby-1.9.3-p194/configure.log
    There has been an error while running configure. Halting the installation.

    I have xcode 4.4 version and mountain lion os.

    Any thoughts?

    • dattyle

      sorry, didn’t read read the other comments to get answers! great tutorial btw…google searched like crazy until I landed here. thanks again!!

    • http://twitter.com/OfcaPL Łukasz Kupś

      same here. I’ve tried everything – reinstalling xcode, command line tools etc. but nothing works :/

  • Graham

    Hi all

    I am trying to install ruby 1.9.2 when I run this I see the text doc and press q then receive this message

    The provided compiler ‘/usr/bin/gcc’ is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.

    I am running OSX 10.8 with the latest version of Xcode with the command line tools installed? Any ideas…..

    Thanks

    • Ted

      I had this problem as well. “rvm install 1.9.3 –with-gcc=clang” instead of just “rvm install 1.9.3″ solved it for me

  • devang

    thanks John

  • http://www.vietsonnguyen.com Vietson N.

    One thing I would suggest is replacing step 1 installation url to this “bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)". I could not get it to install on my MBA using https://rvm.beginrescueend.com/install/rvm.

  • Galactic

    sorry If I sound noobish but I downloaded ruby and everything. All I want to know is how to run a .rb file?
    Is there like a ruby interactive like there is on the windows version?

  • Selva ganesh

    I’m finding it quite difficult to install rvm on windows. Can anyone guide me to resolve it… ??? I already installed ruby 1.9.3 but i need to install rvm …

  • Kurt

    Thanks for this!

  • Johann

    To install Ruby 1.9.3 on a mac, I would recommend using the following command in step 5:

    rvm install 1.9.3 –with-gcc=clang

    otherwise, when you install rails, it will try to compile the pkg with llvm.

  • rich4321

    On step 6, I wasn’t able to use rvm –default 1.9.3. Terminal complian about login, at first I had no clue what it meant. After doing some search in the Ubuntu form I found out you need to type in this:
    bash –login
    then
    rvm –default use 1.9.3

    Finally got it to work!

    Why is it so complicated to set up a RoR environment?

  • Jonathan

    I had a lot of troubles setting this up but using this help blog http://cczona.com/blog/2012/07/fix-for-make-usrbingcc-4-2-no-such-file-or-directory/ I was able to get up and running in no time once HomeBrew was installed.

  • Jingjie

    Thanks for your post!! I was struggling with the official RVM guide but made no progress and now I have ruby 1.9.3 and latest rails installed. Thanks a lot!

  • http://www.facebook.com/bobbie.stump Bobbie Stump

    May be down below, but you forgot to mention you have to go to “Xcode > Preferences > Components” and click the “Install” button next to “Command Line Tools.”

  • disule

    I struggled with error messages for the longest before finally finding this from http://stackoverflow.com/questions/4546573/how-to-upgrade-to-ruby-1-9-2:

    1. Open Xcode, go to Preferences – Downloads
    2. Make sure that “Command Line Tools” is installed (150 MB download); this is (silently) required for Ruby to install, and used to be part of OSX / Xcode by default, but no longer
    3. Ignore the RVM website – it links to bad installers for OS X (don’t bother, not worth the pain. I tried them, they failed)
    4. Use JewelryBox, which is a little less rubbish than the official installer: http://unfiniti.com/software/mac/jewelrybox
    5. Run it, click Add Ruby, select ruby-1.9.3-p125 (has to be that version or higher, or it won’t compile, because the previous versions need a compiler that’s no longer in OS X)
    6. Select “Autodetect” and “use clang”
    7. …wait a LONG time…
    8. If JewelryBox crashes immediately, it means you missed either step 2 above, or step 6 above (RVM crashes spectacularly if clang isn’t installed, and neither RVM nor jewelrybox checks in advance)

  • 2pkothari

    I get the below error and nothing is getting installed. Please help.

    The provided compiler ‘/usr/bin/gcc’ is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.

  • 2pkothari

    rvm get head and then install 1.9.3 worked.

  • Soodip Neogi

    Hi,

    It did not work… please help some other war…

    • Soodip Neogi

      I am getting the following in the terminal…

      ———————————————————-

      SN-Mac:~ soodip$ rvm install 1.9.2

      No binary rubies available for: downloads/ruby-1.9.2-p320.

      Continuing with compilation. Please read ‘rvm mount’ to get more information on binary rubies.

      Fetching yaml-0.1.4.tar.gz to /Users/soodip/.rvm/archives

      Extracting yaml to /Users/soodip/.rvm/src/yaml-0.1.4

      Configuring yaml in /Users/soodip/.rvm/src/yaml-0.1.4.

      Error running ‘./configure –prefix=/Users/soodip/.rvm/usr’, please read /Users/soodip/.rvm/log/ruby-1.9.2-p320/yaml/configure.log

      Compiling yaml in /Users/soodip/.rvm/src/yaml-0.1.4.

      Error running ‘make’, please read /Users/soodip/.rvm/log/ruby-1.9.2-p320/yaml/make.log

      Installing Ruby from source to: /Users/soodip/.rvm/rubies/ruby-1.9.2-p320, this may take a while depending on your cpu(s)…

      ruby-1.9.2-p320 – #downloading ruby-1.9.2-p320, this may take a while depending on your connection…

      ruby-1.9.2-p320 – #extracted to /Users/soodip/.rvm/src/ruby-1.9.2-p320 (already extracted)

      ruby-1.9.2-p320 – #configuring

      Error running ‘env CFLAGS=-I/Users/soodip/.rvm/usr/include LDFLAGS=-L/Users/soodip/.rvm/usr/lib ./configure –enable-shared –disable-install-doc –prefix=/Users/soodip/.rvm/rubies/ruby-1.9.2-p320′, please read /Users/soodip/.rvm/log/ruby-1.9.2-p320/configure.log

      There has been an error while running configure. Halting the installation.

      SN-Mac:~ soodip$

      —————————-

  • http://www.facebook.com/fahd.murtaza Fahd Murtaza

    The RVM installation command using CURL above was not giving me any results i.e no processing and command prompt just showed again. I tried this below and it worked for me.

    mkdir -p ~/.rvm/src && cd ~/.rvm/src && rm -rf ./rvm &&
    git clone –depth 1 git://github.com/wayneeseguin/rvm.git &&
    cd rvm && ./install

    So basically you create a directory, clone RVM git repo from github into it and run install after that.

  • Sebastian Stoll

    No binary rubies available for: osx/10.7/x86_64/ruby-1.9.2-p320.

    Continuing with compilation. Please read ‘rvm mount’ to get more information on binary rubies.

    The provided compiler ‘/usr/bin/gcc’ is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.

  • dillon

    I keep getting this error:

    dillon-Laras-MacBook-Pro-4:~ dillonlara$ rvm install 1.9.2

    Searching for binary rubies, this might take some time.

    No binary rubies available for: osx/10.8/x86_64/ruby-1.9.2-p320.

    Continuing with compilation. Please read ‘rvm mount’ to get more information on binary rubies.

    Fetching yaml-0.1.4.tar.gz to /Users/dillonlara/.rvm/archives

    Extracting yaml to /Users/dillonlara/.rvm/src/yaml-0.1.4

    Configuring yaml in /Users/dillonlara/.rvm/src/yaml-0.1.4.

    Error running ‘env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure –prefix=/Users/dillonlara/.rvm/usr –disable-shared’, please read /Users/dillonlara/.rvm/log/ruby-1.9.2-p320/yaml/configure.log

    Compiling yaml in /Users/dillonlara/.rvm/src/yaml-0.1.4.

    Error running ‘make’, please read /Users/dillonlara/.rvm/log/ruby-1.9.2-p320/yaml/make.log

    Installing Ruby from source to: /Users/dillonlara/.rvm/rubies/ruby-1.9.2-p320, this may take a while depending on your cpu(s)…

    ruby-1.9.2-p320 – #downloading ruby-1.9.2-p320, this may take a while depending on your connection…

    ######################################################################## 100.0%

    ruby-1.9.2-p320 – #extracting ruby-1.9.2-p320 to /Users/dillonlara/.rvm/src/ruby-1.9.2-p320

    ruby-1.9.2-p320 – #extracted to /Users/dillonlara/.rvm/src/ruby-1.9.2-p320

    ruby-1.9.2-p320 – #configuring

    Error running ‘env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure –disable-install-doc –prefix=/Users/dillonlara/.rvm/rubies/ruby-1.9.2-p320 –with-opt-dir=/Users/dillonlara/.rvm/usr –disable-shared’, please read /Users/dillonlara/.rvm/log/ruby-1.9.2-p320/configure.log

    There has been an error while running configure. Halting the installation.

    dillon-Laras-MacBook-Pro-4:~ dillonlara$

  • David

    Installed Xcode and Command Line Tools, but getting make error when installing ruby 1.9.3

    rvm install ruby-1.9.3

    cat /Users/tab/.rvm/log/ruby-1.9.3-p374/make.log

    [2013-02-11 12:56:25] make
    CC = clang
    LD = ld
    LDSHARED = clang -dynamic -bundle

    CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -pipe

    XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
    CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/Users/tab/.rvm/usr/include -I. -I.ext/include/x86_64-darwin12.2.1 -I./include -I.
    DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace

    SOLIBS =
    compiling main.c
    compiling dmydln.c
    compiling dmyencoding.c
    compiling version.c
    compiling dmyversion.c
    compiling miniprelude.c
    compiling array.c
    compiling bignum.c
    bignum.c:2732:26: warning: while loop has empty body [-Wempty-body]
    while (–ny && !zds[ny]); ++ny;
    ^
    bignum.c:2732:26: note: put the semicolon on a separate line to silence this warning
    1 warning generated.
    compiling class.c
    compiling compar.c
    compiling complex.c
    compiling dir.c
    compiling dln_find.c
    compiling enum.c
    compiling enumerator.c
    compiling error.c
    compiling eval.c
    compiling load.c
    compiling proc.c
    compiling file.c
    compiling gc.c
    gc.c:3060:1: warning: unused function ‘chain_finalized_object’ [-Wunused-function]
    chain_finalized_object(st_data_t key, st_data_t val, st_data_t arg)

    ^

    1 warning generated.
    compiling hash.c
    compiling inits.c
    compiling io.c
    compiling marshal.c
    compiling math.c
    compiling node.c
    compiling numeric.c
    compiling object.c
    compiling pack.c
    compiling parse.c
    compiling process.c
    compiling random.c
    compiling range.c
    compiling rational.c
    compiling re.c
    compiling regcomp.c
    compiling regenc.c
    compiling regerror.c
    compiling regexec.c
    compiling regparse.c
    regparse.c:582:15: error: implicit conversion loses integer precision: ‘st_index_t’ (aka ‘unsigned long’) to ‘int’ [-Werror,-Wshorten-64-to-32]
    return t->num_entries;
    ~~~~~~ ~~~^~~~~~~~~~~
    1 error generated.
    make: *** [regparse.o] Error 1

  • Jeevan

    Hi,

    I am trying to install ruby 1.9.3 and I get this error message. Please help me with this.

    Jeevans-MacBook-Pro:~ JeevanKumarGeddam$ rvm install 1.9.3 –with-gcc=clang

    Fetching yaml-0.1.4.tar.gz to /Users/JeevanKumarGeddam/.rvm/archives

    Extracting yaml to /Users/JeevanKumarGeddam/.rvm/src/yaml-0.1.4

    Configuring yaml in /Users/JeevanKumarGeddam/.rvm/src/yaml-0.1.4.

    Compiling yaml in /Users/JeevanKumarGeddam/.rvm/src/yaml-0.1.4.

    Installing yaml to /Users/JeevanKumarGeddam/.rvm/usr

    Installing Ruby from source to: /Users/JeevanKumarGeddam/.rvm/rubies/ruby-1.9.3-p385, this may take a while depending on your cpu(s)…

    ruby-1.9.3-p385 – #downloading ruby-1.9.3-p385, this may take a while depending on your connection…

    ruby-1.9.3-p385 – #extracted to /Users/JeevanKumarGeddam/.rvm/src/ruby-1.9.3-p385 (already extracted)

    ruby-1.9.3-p385 – #configuring

    ruby-1.9.3-p385 – #compiling

    Error running ‘make’, please read /Users/JeevanKumarGeddam/.rvm/log/ruby-1.9.3-p385/make.log

    There has been an error while running make. Halting the installation.

  • Charlie

    getting a load of errors:

    No binary rubies available for: osx/10.8/x86_64/ruby-2.0.0-rc2.

    Continuing with compilation. Please read ‘rvm mount’ to get more information on binary rubies.

    as well as

    Error running ‘./configure –prefix=/Users/myname/.rvm/usr –disable-shared’, please read /Users/
    myname/.rvm/log/ruby-2.0.0-rc2/yaml/configure.log

    &

    Error running ‘make’, please read /Users/myname/.rvm/log/ruby-2.0.0-rc2/yaml/make.log

    &

    Error running ‘make’, please read /Users/myname/.rvm/log/ruby-2.0.0-rc2/openssl/make.log

    &

    Error running ‘update_openssl_certs’, please read /Users/myname/.rvm/log/ruby-2.0.0-rc2/openssl.certs.log

    Some help would be great.

    Thanks,

    Charlie

  • lorena

    while installing ruby version 1.9.2 i obtained the following error message, “Error running ‘./configure –disable-install-doc –prefix=/Users/lorenamesa/.rvm/rubies/ruby-1.9.2-p320 –with-opt-dir=/Users/lorenamesa/.rvm/usr –disable-shared’, please read /Users/lorenamesa/.rvm/log/ruby-1.9.2-p320/configure.log

    There has been an error while running configure. Halting the installation.”

  • David

    Davids-MacBook-Pro:~ David$ gem install rails

    ERROR: Loading command: install (LoadError)

    cannot load such file — openssl

    ERROR: While executing gem … (NoMethodError)

    undefined method `invoke_with_build_args’ for nil:NilClass

    • David

      Whenever i try to install rails i get this error message

  • Bernie Brightman

    Steps 1 and 2 went fine, but step 3 failed with the error:

    -bash: rvm: command not found.

    Also did not find anything named .rvm in the home directory.

    This is running Mac OS X 10.7.5.

    Any suggestions?

  • http://www.facebook.com/eguurt Егор Малькевич

    thx u save my time. It is not so easy setup Ruby on mac :(

  • Battagello

    Hi all,

    When I entered “rvm install 1.9.2″, after a while, I got the following:
    (…)
    ruby-1.9.2-p320 – #configuring……..

    Error running ‘env CFLAGS=-O3 -I/usr/local/opt/readline/include -I/usr/local/opt/libxml2/include -I/usr/local/opt/libxslt/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include LDFLAGS=-L/usr/local/opt/readline/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/libxslt/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib ./configure –prefix=/Users/lucbat/.rvm/rubies/ruby-1.9.2-p320 –with-opt-dir=/usr/local/opt/libyaml –disable-install-doc –without-tcl –without-tk –enable-shared’,

    please read /Users/lucbat/.rvm/log/ruby-1.9.2-p320/configure.log

    There has been an error while running configure. Halting the installation.

    I didn’t find anything here related to this problem. Can anybody help me with this issue?

    Thanks a lot,

    Battagello

  • Adam

    Hi Jeffery,

    I get this error message when I’m installing ruby 1.9.2. Please help. Thanks a lot.

    Error running ‘env CFLAGS=-O3 -I/Users/hoscb/.rvm/opt/readline/include -I/Users/hoscb/.rvm/opt/libxml2/include -I/Users/hoscb/.rvm/opt/libxslt/include -I/Users/hoscb/.rvm/opt/libksba/include -I/Users/hoscb/.rvm/opt/openssl/include -I/Users/hoscb/.rvm/opt/sqlite/include LDFLAGS=-L/Users/hoscb/.rvm/opt/readline/lib -L/Users/hoscb/.rvm/opt/libxml2/lib -L/Users/hoscb/.rvm/opt/libxslt/lib -L/Users/hoscb/.rvm/opt/libksba/lib -L/Users/hoscb/.rvm/opt/openssl/lib -L/Users/hoscb/.rvm/opt/sqlite/lib ./configure –prefix=/Users/hoscb/.rvm/rubies/ruby-1.9.2-p320 –with-opt-dir=/Users/hoscb/.rvm/opt/libyaml –disable-install-doc –without-tcl –without-tk –enable-shared’,
    please read /Users/hoscb/.rvm/log/ruby-1.9.2-p320/configure.log
    There has been an error while running configure. Halting the installation.

  • Adam

    Please help!

    ruby-1.9.2-p320 – #configuring……..

    Error running ‘env CFLAGS=-O3 -I/Users/adamwolf/.rvm/opt/readline/include -I/Users/adamwolf/.rvm/opt/libxml2/include -I/Users/adamwolf/.rvm/opt/libxslt/include -I/Users/adamwolf/.rvm/opt/libksba/include -I/Users/adamwolf/.rvm/opt/openssl/include -I/Users/adamwolf/.rvm/opt/sqlite/include LDFLAGS=-L/Users/adamwolf/.rvm/opt/readline/lib -L/Users/adamwolf/.rvm/opt/libxml2/lib -L/Users/adamwolf/.rvm/opt/libxslt/lib -L/Users/adamwolf/.rvm/opt/libksba/lib -L/Users/adamwolf/.rvm/opt/openssl/lib -L/Users/adamwolf/.rvm/opt/sqlite/lib ./configure –prefix=/Users/adamwolf/.rvm/rubies/ruby-1.9.2-p320 –with-opt-dir=/Users/adamwolf/.rvm/opt/libyaml –disable-install-doc –without-tcl –without-tk –enable-shared’,

    please read /Users/adamwolf/.rvm/log/ruby-1.9.2-p320/configure.log

    There has been an error while running configure. Halting the installation.

  • http://www.facebook.com/john.hubbs.92 John Hubbs

    Tried install command and got this error. What do I do?
    Error running ‘env CFLAGS=-O3 -I/Users/John/.rvm/opt/readline/include -I/Users/John/.rvm/opt/libxml2/include -I/Users/John/.rvm/opt/libxslt/include -I/Users/John/.rvm/opt/libksba/include -I/Users/John/.rvm/opt/openssl/include -I/Users/John/.rvm/opt/sqlite/include LDFLAGS=-L/Users/John/.rvm/opt/readline/lib -L/Users/John/.rvm/opt/libxml2/lib -L/Users/John/.rvm/opt/libxslt/lib -L/Users/John/.rvm/opt/libksba/lib -L/Users/John/.rvm/opt/openssl/lib -L/Users/John/.rvm/opt/sqlite/lib ./configure –prefix=/Users/John/.rvm/rubies/ruby-1.9.2-p320 –with-opt-dir=/Users/John/.rvm/opt/libyaml –disable-install-doc –without-tcl –without-tk –enable-shared’,

    please read /Users/John/.rvm/log/ruby-1.9.2-p320/1366515545_configure.log

    There has been an error while running configure. Halting the installation.

  • Luke

    This is what I keep getting:

    Error running ‘env CFLAGS=-O3 -I/Users/newuser/.rvm/opt/readline/include -I/Users/newuser/.rvm/opt/libxml2/include -I/Users/newuser/.rvm/opt/libxslt/include -I/Users/newuser/.rvm/opt/libksba/include -I/Users/newuser/.rvm/opt/openssl/include -I/Users/newuser/.rvm/opt/sqlite/include LDFLAGS=-L/Users/newuser/.rvm/opt/readline/lib -L/Users/newuser/.rvm/opt/libxml2/lib -L/Users/newuser/.rvm/opt/libxslt/lib -L/Users/newuser/.rvm/opt/libksba/lib -L/Users/newuser/.rvm/opt/openssl/lib -L/Users/newuser/.rvm/opt/sqlite/lib ./configure –prefix=/Users/newuser/.rvm/rubies/ruby-1.9.2-p320 –with-opt-dir=/Users/newuser/.rvm/opt/libyaml –disable-install-doc –without-tcl –without-tk –enable-shared’,

    please read /Users/newuser/.rvm/log/ruby-1.9.2-p320/1367155330_configure.log

    There has been an error while running configure. Halting the installation.

    Please give me a hand at this…

  • mugil

    Hi,

    I get the following error on “sudo rvm install 1.9.2″
    Could you please help.

    Error running ‘env CFLAGS=-O3 -I/usr/local/opt/readline/include -I/usr/local/opt/libxml2/include -I/usr/local/opt/libxslt/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include LDFLAGS=-L/usr/local/opt/readline/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/libxslt/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib ./configure –prefix=/Users/eparamasivam/.rvm/rubies/ruby-1.9.2-p320 –with-opt-dir=/usr/local/opt/libyaml –disable-install-doc –without-tcl –without-tk –enable-shared’,

    please read /Users/eparamasivam/.rvm/log/ruby-1.9.2-p320/1367957674_configure.log

    There has been an error while running configure. Halting the installation.

    Thanks

    Mugil

  • http://www.facebook.com/Sachin.Gupta88 Sachin Gupta

    Hey guys, I am having trouble with Step 5 – Downloading Ruby. Here’s the error message that I am getting. Thanks in advance! -Sachin

    Sachins-MacBook-Pro:~ sachingupta$ rvm install ruby-1.9.2-p320

    Searching for binary rubies, this might take some time.

    No binary rubies available for: osx/10.8/x86_64/ruby-1.9.2-p320.

    Continuing with compilation. Please read ‘rvm mount’ to get more information on binary rubies.

    Installing requirements for osx, might require sudo password.

    Certificates in ‘/Users/sachingupta/.rvm/etc/openssl/cert.pem’ already are up to date.

    Installing Ruby from source to: /Users/sachingupta/.rvm/rubies/ruby-1.9.2-p320, this may take a while depending on your cpu(s)…

    ruby-1.9.2-p320 – #downloading ruby-1.9.2-p320, this may take a while depending on your connection…

    ruby-1.9.2-p320 – #extracted to /Users/sachingupta/.rvm/src/ruby-1.9.2-p320 (already extracted)

    ruby-1.9.2-p320 – #configuring……..

    Error running ‘env CFLAGS=-O3 -I/Users/sachingupta/.rvm/opt/readline/include -I/Users/sachingupta/.rvm/opt/libxml2/include -I/Users/sachingupta/.rvm/opt/libxslt/include -I/Users/sachingupta/.rvm/opt/libksba/include -I/Users/sachingupta/.rvm/opt/openssl/include -I/Users/sachingupta/.rvm/opt/sqlite/include LDFLAGS=-L/Users/sachingupta/.rvm/opt/readline/lib -L/Users/sachingupta/.rvm/opt/libxml2/lib -L/Users/sachingupta/.rvm/opt/libxslt/lib -L/Users/sachingupta/.rvm/opt/libksba/lib -L/Users/sachingupta/.rvm/opt/openssl/lib -L/Users/sachingupta/.rvm/opt/sqlite/lib ./configure –prefix=/Users/sachingupta/.rvm/rubies/ruby-1.9.2-p320 –with-opt-dir=/Users/sachingupta/.rvm/opt/libyaml –disable-install-doc –without-tcl –without-tk –enable-shared’,

    please read /Users/sachingupta/.rvm/log/ruby-1.9.2-p320/1367977568_configure.log

    There has been an error while running configure. Halting the installation.

    Here’s the 1367977568_configure.log file:

    ./configure

    configure: WARNING: unrecognized options: –without-tcl, –without-tk

    checking build system type… i386-apple-darwin12.3.0

    checking host system type… i386-apple-darwin12.3.0

    checking target system type… i386-apple-darwin12.3.0

    checking whether the C compiler works… no

    configure: error: in `/Users/sachingupta/.rvm/src/ruby-1.9.2-p320′:

    configure: error: C compiler cannot create executables

    See `config.log’ for more details

  • Chris Beyer

    Nice tutorial. Much appreciated :)

  • http://twitter.com/JulienCharette Julien Charette

    Hello guys, I’m running OSX 10.8.3. I’m trying to follow this tutorial to update ruby (1.8.7 preinstalled, but I would like to use the latest stable version of 2.0.0).

    Every time I try sudo rvm install 2.0.0, I get the following error:

    Searching for binary rubies, this might take some time.
    No binary rubies available for: osx/10.8/x86_64/ruby-2.0.0-p195.
    Continuing with compilation. Please read ‘rvm mount’ to get more information on binary rubies.
    Installing requirements for osx, might require sudo password.
    Can not find compiler and ‘make’ tool – make sure Xcode and/or Command Line Tools are installed.

    I’m not quite sure what Command Line Tools are (I’m new to mac and all this stuff), but Xcode is installed for sure. Anyone knows what’s going on here?

    Someone posted on stackoverflow to stay away from ruby 2.0 for now. Should I go for 1.9.2 or 1.9.3 instead?

    One last thing, could anyone tell me why I need to do step 2? (I’ve done it, but I would like to understand what it does).

    Thanks

    • Julien Charette

      After messing around a little bit, I found out that Command Line Tools needs to be manually install within XCode. Problem solved! :)