Installing Ruby


Install ruby with package managers

Windows: Download and install Ruby using RubyInstaller

OS X: Ruby is already installed, but it might be version 1.8.7, we want the latest and greatest. ruby-lang.org has instructions in the downloads section on how to do this easliy.

Ubuntu Linux: At the command line: sudo apt-get install ruby

Extras:

For those on a *nix based system (MAC and Ubuntu) you can use Ruby Version Manager to encapsulate your ruby gems. I highly recommend this if you want to program Ruby professionally.

Discusión de la Tarea


  • ivorsmashman dijo:

    Installed Ruby 1.9.3p362 on Fedora Linux 18.
    en 24 de enero de 2013 a las 13:41
  • Jure dijo:

    Installed on using RubyInstaller windows 7

    en 29 de octubre de 2012 a las 08:11
  • Frank Murphy dijo:

    Installed rvm no hitches.

    But was\am aware of Fedora naming conventions.

    Just had to preinstall all deps.

    Using an F16.x86_64  40gb image, which I threw 2cpu and 4gb ram at.

    Should be sufficient.

    en 3 de abril de 2012 a las 04:41

    Andre Dublin dijo:

    Excellent, I don't have much experience with Fedora I'm more of an Ubuntu guy

    en 3 de abril de 2012 a las 07:31 en Respuesta a Frank Murphy
  • sedmonds dijo:

    Any suggestions, similar issues with git/rvm/ruby currect version upgrades or install under mac lion 10.7.3?

    I am having a time getting RVM installed and Ruby updated to the latest version. As of now, I am getting this message: 

    rvm requires autoreconf to install the selected ruby interpreter however autoreconf was not found in the PATH.

     

    My current system is:

    • Mac OS X Version 10.7.3
    • ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
    • rvm 1.10.3
    • Xcode 4.3.1
    • git version 1.7.7.5 (Apple Git-26)

     

    What I've done so far:

    I downloaded the lastest version of Ruby (1.9.3), however running command 'rvm --default use 1.9.3' returns 'rvm is not a function'

    Possible problems with Zend installation: I uninstalled Zend Server CE as running the command 'which git' was pointing to a zend framework directory. Wonky. So I uninstalled the zend framework and reinstalled git under my /home directory

     

    Last:

    I am not sure if this is a permission or file/folder location issue. 

    This issue arose when I first connected to github and failed to save homework files to the /coursework directory for commit.  My work-around was to download the GitHub app for handling repositories. Though, I wonder if I've confused this installation situation more? 

     

    en 18 de marzo de 2012 a las 19:38

    sedmonds dijo:

    bash-3.2$ rvm requirements
    
    
     Notes for Mac OS X 10.7.3, No Xcode.  # Xcode 4.3.1 is installed
    
    
    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
    
        rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system.gems # migrate your gems
    
        rvm alias create default 1.8.7
    
    
    And reopen your terminal windows.
    
    
    Xcode 4.2:
    
     * is only supported by ruby 1.9.3+ using command line flag: --with-gcc=clang
    
     * it breaks gems with native extensions, especially DB drivers.

    en 18 de marzo de 2012 a las 20:04 en Respuesta a sedmonds

    Andre Dublin dijo:

     

    It looks like your missing some necessary binarys, what does your echo $PATH output? Also here is are some links on the autoconf problem.

    http://stackoverflow.com/questions/9575989/install-autoreconf-on-osx-lion

    http://ithaca.arpinum.org/2012/02/20/fun-with-osx.html

    en 18 de marzo de 2012 a las 20:41 en Respuesta a sedmonds

    Andre Dublin dijo:

    I've used the Github app before, it creates it's own separate folders for repos you wish to clone.  This won't cause any conflicts in the system.

     

    this should be your git workflow

    $ git add filename or $ git add .
    
    " . " means all files
    $ git commit -m "this is your message"
    
    $ git push origin master
    en 18 de marzo de 2012 a las 20:50 en Respuesta a sedmonds

    Andre Dublin dijo:

    Heres a great explanation of the autoconf problem.

    http://brianpeddle.com/tag/autoreconf/

    en 18 de marzo de 2012 a las 20:53 en Respuesta a sedmonds

    sedmonds dijo:

    Thanks, Andre.

    For those that are interested, I am reading the Ruby on Rails Tutorial by Michael Hartl.

     

    A quote from Chapter 1.2 called Up and Running, he quotes:

    I think of Chapter 1 as the “weeding out phase” in law school—if you can get your dev environment set up, the rest is easy to get through. 
    —Bob Cavezza

    Also:

    During a failed installation of Ruby 1.9.3, I received an error (runtime?) that xcode-debugopt-fix-r34840.diff could not be run.

    Looking at the error log:

     

    patching file configure.in

    Hunk #1 FAILED at 289.

    Hunk #2 succeeded at 488 with fuzz 3.

    Hunk #3 succeeded at 504 with fuzz 2 (offset -10 lines).

    1 out of 3 hunks FAILED -- saving rejects to file configure.in.rej

     

    After looking at the error log, I found in the Ruby Tutorial on some older OS X systems,
    you might have to include the path to the readline library:

    		$ rvm install 1.9.3 --with-readline-dir=/opt/local 
    en 19 de marzo de 2012 a las 20:42 en Respuesta a Andre Dublin

    Rhodee dijo:

    Hi,

     

    I am not a Mac user (Linux) but I came across some tools that might make this part of the development process less like death.

     

    First there is a company called thoughtbot that provides a script called laptop (Mac OSX 10.6 or greater): https://github.com/thoughtbot/laptop

    Immediate benefit: you don't have to download Xcode. Which seems to give everyone in the environment fits @ some point or another. Instead it installs GCC which is a bit less dense than Xcode, a robust software (IDE, etc.).

    You will need to download GCC first and then run the laptop script. You get quite a bit for not a lot of work. I just went through this install with a designer colleague. It went on with very few hitches.

    en 20 de marzo de 2012 a las 18:41 en Respuesta a sedmonds
  • Frank Murphy dijo:

    Willl be running late.

    Dogs dinner of a week.

    Waiting on ram, hd, to rebuild kvm host, and redeploy guests.

    en 9 de marzo de 2012 a las 04:50
  • F0ry dijo:

    Had some issues installing RVM on Mac os x 10.6.8 but I checked the installation logs and saw I don't have Xcode. I thought I did when I ran rvm requirements. Oh well, there's a couple more days before this starts, so I guess I have enough time to get xcode 3.2.6 and install RVM. Thanks for the information

    en 8 de marzo de 2012 a las 19:34

    Andre Dublin dijo:

    Sorry about that, forgot about rvm's dependency on Xcode

    en 9 de marzo de 2012 a las 07:28 en Respuesta a F0ry
  • Andre Dublin dijo:

    I can't stress enough the awesomeness of Ruby Version Manager.  I recommend that you use that if you are on a *nix system.

     

    Also I found a windows only installer of Ruby on Rails here http://railsinstaller.org/ I believe this would be a better choice than Ruby Installer, unless you want to build your own.

    en 7 de marzo de 2012 a las 23:05

    Mark Finlay dijo:

    I agree. RVM is excellent. Have you tried rbenv? What's the major diferences between RVM and rbenv?

    en 9 de marzo de 2012 a las 19:11 en Respuesta a Andre Dublin

    Andre Dublin dijo:

    I've played with it a bit, but enjoy the cmd line that rvm provides over rbenv.

    en 9 de marzo de 2012 a las 22:16 en Respuesta a Mark Finlay

    Andre Dublin dijo:

    The established leader in the Ruby version management scene isRVM but rbenv is an interesting alternative if you want or need something significantly lighter with fewer features. Think of it as a bit like Sinatra and Rails.

     

    Did some interweb searching and came across this about rbenv compared to rvm

     

    http://www.rubyinside.com/rbenv-a-simple-new-ruby-version-management-tool-5302.html

    en 9 de marzo de 2012 a las 22:28 en Respuesta a Mark Finlay