Skip to content

Instantly share code, notes, and snippets.

@roolo
Created April 6, 2012 19:25
Show Gist options
  • Select an option

  • Save roolo/2322235 to your computer and use it in GitHub Desktop.

Select an option

Save roolo/2322235 to your computer and use it in GitHub Desktop.
Ruby 1.9.3 p125 @ Lion

Installing Ruby 1.9.3p125 on Mac OS X 10.7.3 – Lion

About this gist

  • Environment — clean Mac OS X 10.7.3 – Lion installation
  • all other files are examples of each of following installation steps
  • commented lines in examples is output of preceding command
  • I'll use rvm for installing Ruby in this gist

Installation

0. Install homebrew

First time i thought i'll use homebrew to install gcc, but to install gcc you need git and for installing git you need gcc. BitchPleaseFace.psd.exe

https://gist.github.com/2322235#file_brew_install.sh

Run doctor to see if everything is ok

https://gist.github.com/2322235#file_brew_doctor.sh

1. Install gcc

If you want to have complete environment download Xcode 4.3+ from Mac App Store. Then run Xcode and install Command line tools

If you don't want to download the few Gigs use project called OSX gcc installer. Download and install package for your version of MOX.

You will not need it in following steps, but after installing gcc you can finally install git by brew. If you do, notice brew is complaining about version of Xcode. Solve it if you want ;)

2. Install rvm

https://gist.github.com/2322235#file_rvm_install.sh

3. Install ruby 1.9.3

https://gist.github.com/2322235#file_rvm_install_1.9.3.sh

4. Test your newly installed ruby

https://gist.github.com/2322235#file_ruby_test.sh

And now go to celebrate............ Welcome in Rails App Screenshot

brew doctor
# Warning: You have no /usr/bin/cc.
# This means you probably can't build *anything*. You need to install the Command
# Line Tools for Xcode. You can either download this from http://connect.apple.com
# or install them from inside Xcode's Download preferences. Homebrew does not
# require all of Xcode! You only need the Command Line Tools package!
# Warning: Git could not be found in your PATH.
# Homebrew uses Git for several internal functions, and some formulae use Git
# checkouts instead of stable tarballs. You may want to install Git:
# brew install git
/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
# homebrew/master/Library/Contributions/install_homebrew.rb)"
# ==> This script will install:
# /usr/local/bin/brew
# /usr/local/Library/Formula/...
# /usr/local/Library/Homebrew/...
#
# Press enter to continue
# ==> /usr/bin/sudo /bin/mkdir /usr/local
#
# WARNING: Improper use of the sudo command could lead to data loss
# or the deletion of important system files. Please double-check your
# typing when using sudo. Type "man sudo" for more information.
#
# To proceed, enter your password, or type Ctrl-C to abort.
#
# Password:
# ==> /usr/bin/sudo /bin/chmod g+rwx /usr/local
# ==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local
# ==> Downloading and Installing Homebrew...
# ==> Installation successful!
# You should run `brew doctor' *before* you install anything.
# Now type: brew help
mkdir ruby-test
cd ruby-test/
rvm --rvmrc --create 1.9.3@ruby-test
cd ..;cd -
# /Users/mailo/ruby-test
# ==============================================================================
# = NOTICE =
# ==============================================================================
# = RVM has encountered a new or modified .rvmrc file in the current directory =
# = This is a shell script and therefore may contain any shell commands. =
# = =
# = Examine the contents of this file carefully to be sure the contents are =
# = safe before trusting it! ( Choose v[iew] below to view the contents ) =
# ==============================================================================
# Do you wish to trust this .rvmrc file? (/Users/mailo/ruby-test/.rvmrc)
# y[es], n[o], v[iew], c[ancel]> y
ruby -v
# ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.2.0]
gem install rails
# Fetching: i18n-0.6.0.gem (100%)
# Fetching: multi_json-1.2.0.gem (100%)
# Fetching: activesupport-3.2.3.gem (100%)
# Fetching: builder-3.0.0.gem (100%)
# Fetching: activemodel-3.2.3.gem (100%)
# Fetching: rack-1.4.1.gem (100%)
# Fetching: rack-cache-1.2.gem (100%)
# Fetching: rack-test-0.6.1.gem (100%)
# Fetching: journey-1.0.3.gem (100%)
# Fetching: hike-1.2.1.gem (100%)
# Fetching: tilt-1.3.3.gem (100%)
# Fetching: sprockets-2.1.2.gem (100%)
# Fetching: erubis-2.7.0.gem (100%)
# Fetching: actionpack-3.2.3.gem (100%)
# Fetching: arel-3.0.2.gem (100%)
# Fetching: tzinfo-0.3.32.gem (100%)
# Fetching: activerecord-3.2.3.gem (100%)
# Fetching: activeresource-3.2.3.gem (100%)
# Fetching: mime-types-1.18.gem (100%)
# Fetching: polyglot-0.3.3.gem (100%)
# Fetching: treetop-1.4.10.gem (100%)
# Fetching: mail-2.4.4.gem (100%)
# Fetching: actionmailer-3.2.3.gem (100%)
# Fetching: rake-0.9.2.2.gem (100%)
# Fetching: thor-0.14.6.gem (100%)
# Fetching: rack-ssl-1.3.2.gem (100%)
# Fetching: json-1.6.6.gem (100%)
# Building native extensions. This could take a while...
# Fetching: rdoc-3.12.gem (100%)
# Depending on your version of ruby, you may need to install ruby rdoc/ri data:
#
# <= 1.8.6 : unsupported
# = 1.8.7 : gem install rdoc-data; rdoc-data --install
# = 1.9.1 : gem install rdoc-data; rdoc-data --install
# >= 1.9.2 : nothing to do! Yay!
# Fetching: railties-3.2.3.gem (100%)
# Fetching: rails-3.2.3.gem (100%)
# Successfully installed i18n-0.6.0
# Successfully installed multi_json-1.2.0
# Successfully installed activesupport-3.2.3
# Successfully installed builder-3.0.0
# Successfully installed activemodel-3.2.3
# Successfully installed rack-1.4.1
# Successfully installed rack-cache-1.2
# Successfully installed rack-test-0.6.1
# Successfully installed journey-1.0.3
# Successfully installed hike-1.2.1
# Successfully installed tilt-1.3.3
# Successfully installed sprockets-2.1.2
# Successfully installed erubis-2.7.0
# Successfully installed actionpack-3.2.3
# Successfully installed arel-3.0.2
# Successfully installed tzinfo-0.3.32
# Successfully installed activerecord-3.2.3
# Successfully installed activeresource-3.2.3
# Successfully installed mime-types-1.18
# Successfully installed polyglot-0.3.3
# Successfully installed treetop-1.4.10
# Successfully installed mail-2.4.4
# Successfully installed actionmailer-3.2.3
# Successfully installed rake-0.9.2.2
# Successfully installed thor-0.14.6
# Successfully installed rack-ssl-1.3.2
# Successfully installed json-1.6.6
# Successfully installed rdoc-3.12
# Successfully installed railties-3.2.3
# Successfully installed rails-3.2.3
# 30 gems installed
# Installing ri documentation for i18n-0.6.0...
# Installing ri documentation for multi_json-1.2.0...
# Installing ri documentation for activesupport-3.2.3...
# Installing ri documentation for builder-3.0.0...
# unable to convert "\xF1" from ASCII-8BIT to UTF-8 for README, skipping
# unable to convert "\xF1" from ASCII-8BIT to UTF-8 for README.rdoc, skipping
# Installing ri documentation for activemodel-3.2.3...
# Installing ri documentation for rack-1.4.1...
# Installing ri documentation for rack-cache-1.2...
# Installing ri documentation for rack-test-0.6.1...
# Installing ri documentation for journey-1.0.3...
# Installing ri documentation for hike-1.2.1...
# Installing ri documentation for tilt-1.3.3...
# Installing ri documentation for sprockets-2.1.2...
# Installing ri documentation for erubis-2.7.0...
# Installing ri documentation for actionpack-3.2.3...
# Installing ri documentation for arel-3.0.2...
# Installing ri documentation for tzinfo-0.3.32...
# Installing ri documentation for activerecord-3.2.3...
# Installing ri documentation for activeresource-3.2.3...
# Installing ri documentation for mime-types-1.18...
# Installing ri documentation for polyglot-0.3.3...
# Installing ri documentation for treetop-1.4.10...
# Installing ri documentation for mail-2.4.4...
# Installing ri documentation for actionmailer-3.2.3...
# Installing ri documentation for rake-0.9.2.2...
# Installing ri documentation for thor-0.14.6...
# Installing ri documentation for rack-ssl-1.3.2...
# Installing ri documentation for json-1.6.6...
# Installing ri documentation for rdoc-3.12...
# Installing ri documentation for railties-3.2.3...
# Installing ri documentation for rails-3.2.3...
# Installing RDoc documentation for i18n-0.6.0...
# Installing RDoc documentation for multi_json-1.2.0...
# Installing RDoc documentation for activesupport-3.2.3...
# Installing RDoc documentation for builder-3.0.0...
# unable to convert "\xF1" from ASCII-8BIT to UTF-8 for README, skipping
# unable to convert "\xF1" from ASCII-8BIT to UTF-8 for README.rdoc, skipping
# Installing RDoc documentation for activemodel-3.2.3...
# Installing RDoc documentation for rack-1.4.1...
# Installing RDoc documentation for rack-cache-1.2...
# Installing RDoc documentation for rack-test-0.6.1...
# Installing RDoc documentation for journey-1.0.3...
# Installing RDoc documentation for hike-1.2.1...
# Installing RDoc documentation for tilt-1.3.3...
# Installing RDoc documentation for sprockets-2.1.2...
# Installing RDoc documentation for erubis-2.7.0...
# Installing RDoc documentation for actionpack-3.2.3...
# Installing RDoc documentation for arel-3.0.2...
# Installing RDoc documentation for tzinfo-0.3.32...
# Installing RDoc documentation for activerecord-3.2.3...
# Installing RDoc documentation for activeresource-3.2.3...
# Installing RDoc documentation for mime-types-1.18...
# Installing RDoc documentation for polyglot-0.3.3...
# Installing RDoc documentation for treetop-1.4.10...
# Installing RDoc documentation for mail-2.4.4...
# Installing RDoc documentation for actionmailer-3.2.3...
# Installing RDoc documentation for rake-0.9.2.2...
# Installing RDoc documentation for thor-0.14.6...
# Installing RDoc documentation for rack-ssl-1.3.2...
# Installing RDoc documentation for json-1.6.6...
# Installing RDoc documentation for rdoc-3.12...
# Installing RDoc documentation for railties-3.2.3...
# Installing RDoc documentation for rails-3.2.3...
rails new .
# exist
# create README.rdoc
# create Rakefile
# create config.ru
# create .gitignore
# create Gemfile
# create app
# create app/assets/images/rails.png
# create app/assets/javascripts/application.js
# create app/assets/stylesheets/application.css
# create app/controllers/application_controller.rb
# create app/helpers/application_helper.rb
# create app/mailers
# create app/models
# create app/views/layouts/application.html.erb
# create app/mailers/.gitkeep
# create app/models/.gitkeep
# create config
# create config/routes.rb
# create config/application.rb
# create config/environment.rb
# create config/environments
# create config/environments/development.rb
# create config/environments/production.rb
# create config/environments/test.rb
# create config/initializers
# create config/initializers/backtrace_silencers.rb
# create config/initializers/inflections.rb
# create config/initializers/mime_types.rb
# create config/initializers/secret_token.rb
# create config/initializers/session_store.rb
# create config/initializers/wrap_parameters.rb
# create config/locales
# create config/locales/en.yml
# create config/boot.rb
# create config/database.yml
# create db
# create db/seeds.rb
# create doc
# create doc/README_FOR_APP
# create lib
# create lib/tasks
# create lib/tasks/.gitkeep
# create lib/assets
# create lib/assets/.gitkeep
# create log
# create log/.gitkeep
# create public
# create public/404.html
# create public/422.html
# create public/500.html
# create public/favicon.ico
# create public/index.html
# create public/robots.txt
# create script
# create script/rails
# create test/fixtures
# create test/fixtures/.gitkeep
# create test/functional
# create test/functional/.gitkeep
# create test/integration
# create test/integration/.gitkeep
# create test/unit
# create test/unit/.gitkeep
# create test/performance/browsing_test.rb
# create test/test_helper.rb
# create tmp/cache
# create tmp/cache/assets
# create vendor/assets/javascripts
# create vendor/assets/javascripts/.gitkeep
# create vendor/assets/stylesheets
# create vendor/assets/stylesheets/.gitkeep
# create vendor/plugins
# create vendor/plugins/.gitkeep
# run bundle install
# Fetching gem metadata from https://rubygems.org/.........
# Using rake (0.9.2.2)
# Using i18n (0.6.0)
# Using multi_json (1.2.0)
# Using activesupport (3.2.3)
# Using builder (3.0.0)
# Using activemodel (3.2.3)
# Using erubis (2.7.0)
# Using journey (1.0.3)
# Using rack (1.4.1)
# Using rack-cache (1.2)
# Using rack-test (0.6.1)
# Using hike (1.2.1)
# Using tilt (1.3.3)
# Using sprockets (2.1.2)
# Using actionpack (3.2.3)
# Using mime-types (1.18)
# Using polyglot (0.3.3)
# Using treetop (1.4.10)
# Using mail (2.4.4)
# Using actionmailer (3.2.3)
# Using arel (3.0.2)
# Using tzinfo (0.3.32)
# Using activerecord (3.2.3)
# Using activeresource (3.2.3)
# Using bundler (1.1.3)
# Installing coffee-script-source (1.2.0)
# Installing execjs (1.3.0)
# Installing coffee-script (2.2.0)
# Using rack-ssl (1.3.2)
# Using json (1.6.6)
# Using rdoc (3.12)
# Using thor (0.14.6)
# Using railties (3.2.3)
# Installing coffee-rails (3.2.2)
# Installing jquery-rails (2.0.2)
# Using rails (3.2.3)
# Installing sass (3.1.15)
# Installing sass-rails (3.2.5)
# Installing sqlite3 (1.3.5) with native extensions
# Installing uglifier (1.2.4)
# Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
rails s
# => Booting WEBrick
# => Rails 3.2.3 application starting in development on http://0.0.0.0:3000
# => Call with -d to detach
# => Ctrl-C to shutdown server
# [2012-04-06 22:20:36] INFO WEBrick 1.3.1
# [2012-04-06 22:20:36] INFO ruby 1.9.3 (2012-02-16) [x86_64-darwin11.2.0]
# [2012-04-06 22:20:36] INFO WEBrick::HTTPServer#start: pid=28168 port=3000
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
# Downloading RVM from wayneeseguin branch stable
# % Total % Received % Xferd Average Speed Time Time Time Current
# Dload Upload Total Spent Left Speed
# 100 990k 100 990k 0 0 88610 0 0:00:11 0:00:11 --:--:-- 85902
#
# Installing RVM to /Users/mailo/.rvm/
# Adding rvm PATH line to /Users/mailo/.bashrc /Users/mailo/.zshrc.
# Adding rvm loading line to /Users/mailo/.bash_login /Users/mailo/.zlogin.
#
# # RVM: Shell scripts enabling management of multiple ruby environments.
# # RTFM: https://rvm.beginrescueend.com/
# # HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net)
# # Screencast: http://screencasts.org/episodes/how-to-use-rvm
#
# # In case of any issues read output of 'rvm requirements' and/or 'rvm notes'
#
# Installation of RVM in /Users/mailo/.rvm/ is almost complete:
#
# * To start using RVM you need to run `source /Users/mailo/.rvm/scripts/rvm`
# in all your open shell windows, in rare cases you need to reopen all shell windows.
#
# * Optionally you can run `rvm tools rvm-env ruby bash` which will generate
# shebang wrappers for easier selecting ruby in scripts.
#
# # mailo,
# #
# # Thank you for using RVM!
# # I sincerely hope that RVM helps to make your life easier and more enjoyable!!!
# #
# # ~Wayne
#
#
# rvm 1.11.6 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/]
source ~/.rvm/scripts/rvm
rvm install 1.9.3
# Fetching yaml-0.1.4.tar.gz to /Users/mailo/.rvm/archives
# % Total % Received % Xferd Average Speed Time Time Time Current
# Dload Upload Total Spent Left Speed
# 100 460k 100 460k 0 0 105k 0 0:00:04 0:00:04 --:--:-- 127k
# Extracting yaml-0.1.4.tar.gz to /Users/mailo/.rvm/src
# Configuring yaml in /Users/mailo/.rvm/src/yaml-0.1.4.
# Compiling yaml in /Users/mailo/.rvm/src/yaml-0.1.4.
# Installing yaml to /Users/mailo/.rvm/usr
# Installing Ruby from source to: /Users/mailo/.rvm/rubies/ruby-1.9.3-p125, this may take a while depending on your cpu(s)...
#
# ruby-1.9.3-p125 - #fetching
# ruby-1.9.3-p125 - #downloading ruby-1.9.3-p125, 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 9505k 100 9505k 0 0 443k 0 0:00:21 0:00:21 --:--:-- 639k
# ruby-1.9.3-p125 - #extracting ruby-1.9.3-p125 to /Users/mailo/.rvm/src/ruby-1.9.3-p125
# ruby-1.9.3-p125 - #extracted to /Users/mailo/.rvm/src/ruby-1.9.3-p125
# Applying patch 'xcode-debugopt-fix-r34840' (located at /Users/mailo/.rvm/patches/ruby/1.9.3/p125/xcode-debugopt-fix-r34840.diff)
# ruby-1.9.3-p125 - #autoreconf
# ruby-1.9.3-p125 - #configuring
# ruby-1.9.3-p125 - #compiling
# ruby-1.9.3-p125 - #installing
# Retrieving rubygems-1.8.21
# % Total % Received % Xferd Average Speed Time Time Time Current
# Dload Upload Total Spent Left Speed
# 100 250k 100 250k 0 0 245k 0 0:00:01 0:00:01 --:--:-- 339k
# Extracting rubygems-1.8.21 ...
# Removing old Rubygems files...
# Installing rubygems-1.8.21 for ruby-1.9.3-p125 ...
# Installation of rubygems completed successfully.
# ruby-1.9.3-p125 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
# ruby-1.9.3-p125 - #importing default gemsets (/Users/mailo/.rvm/gemsets/)
# Install of ruby-1.9.3-p125 - #complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment