Skip to content

Instantly share code, notes, and snippets.

@msolli
Last active November 15, 2017 17:21
Show Gist options
  • Select an option

  • Save msolli/575ef8178207449a2b0d to your computer and use it in GitHub Desktop.

Select an option

Save msolli/575ef8178207449a2b0d to your computer and use it in GitHub Desktop.

Revisions

  1. msolli revised this gist Jun 9, 2015. 1 changed file with 14 additions and 8 deletions.
    22 changes: 14 additions & 8 deletions ruby-install
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,23 @@
    brew update
    brew uninstall chruby ruby-install openssl readline libyaml gdbm libffi
    brew install chruby ruby-install openssl readline libyaml gdbm libffi
    brew install chruby chruby-fish ruby-install openssl readline libyaml gdbm libffi
    # Optional:
    brew cleanup

    echo "source /usr/local/opt/chruby/share/chruby/chruby.sh" >> .zshenv # or.zshrc
    echo "source /usr/local/opt/chruby/share/chruby/auto.sh" >> .zshenv # or.zshrc
    # https://github.com/raggi/openssl-osx-ca
    brew tap raggi/ale
    brew install openssl-osx-ca

    ruby-install ruby 2.0
    echo ". /usr/local/share/chruby/chruby.fish" >> .config/fish/config.fish
    echo ". /usr/local/share/chruby/auto.fish" >> .config/fish/config.fish

    echo "ruby-2.0" > .ruby-version
    ruby-install ruby 2.2.2

    # Avslutt shell og start nytt.
    echo "ruby-2.2" > .ruby-version

    ruby -v # => ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.4.0]
    # Restart shell
    # If warnings such as "set: Warning: path component...", see https://github.com/JeanMertz/chruby-fish#known-issues

    ruby -v # => ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]

    gem update --system
    gem --version # > 2.0.0
  2. msolli revised this gist Jun 25, 2013. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions ruby-install
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,17 @@
    brew update
    brew uninstall chruby ruby-install openssl readline libyaml gdbm libffi
    brew install chruby ruby-install
    brew install chruby ruby-install openssl readline libyaml gdbm libffi

    echo "source /usr/local/opt/chruby/share/chruby/chruby.sh" >> .zshenv # or.zshrc
    echo "source /usr/local/opt/chruby/share/chruby/auto.sh" >> .zshenv # or.zshrc

    ruby-install ruby 1.9.3
    ruby-install ruby 2.0

    echo "ruby-1.9" > .ruby-version
    echo "ruby-2.0" > .ruby-version

    # Avslutt shell og start nytt.

    ruby -v # => ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-darwin12.4.0]
    ruby -v # => ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.4.0]

    gem update --system
    gem --version # > 2.0.0
  3. msolli renamed this gist Jun 25, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. msolli revised this gist Jun 25, 2013. 1 changed file with 9 additions and 11 deletions.
    20 changes: 9 additions & 11 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -1,20 +1,18 @@
    brew update
    brew uninstall openssl readline libyaml gdbm libffi curl-ca-bundle
    brew install openssl readline libyaml gdbm libffi curl-ca-bundle
    brew uninstall chruby ruby-install openssl readline libyaml gdbm libffi
    brew install chruby ruby-install

    CFLAGS='-g -O2' CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl` \
    --with-readline-dir=`brew --prefix readline` \
    --with-yaml-dir=`brew --prefix libyaml` \
    --with-gdbm-dir=`brew --prefix gdbm` \
    --with-libffi-dir=`brew --prefix libffi`" ruby-build -v 1.9.3-p392 ~/.rubies/ruby-1.9.3-p392
    echo "source /usr/local/opt/chruby/share/chruby/chruby.sh" >> .zshenv # or.zshrc
    echo "source /usr/local/opt/chruby/share/chruby/auto.sh" >> .zshenv # or.zshrc

    ruby-install ruby 1.9.3

    echo "ruby-1.9" > .ruby-version
    echo "export SSL_CERT_FILE=/usr/local/share/ca-bundle.crt" >> .zshenv

    # Avslutt shell og start nytt.

    ruby -v # => ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.0]
    ruby -v # => ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-darwin12.4.0]

    gem update --system
    gem --version # => # 2.0.0

    gem --version # > 2.0.0
    gem install bundler
  5. msolli revised this gist Mar 1, 2013. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -9,10 +9,12 @@ CFLAGS='-g -O2' CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl` \
    --with-libffi-dir=`brew --prefix libffi`" ruby-build -v 1.9.3-p392 ~/.rubies/ruby-1.9.3-p392

    echo "ruby-1.9" > .ruby-version
    echo "export SSL_CERT_FILE=/usr/local/share/ca-bundle.crt" >> .zshenv

    # Avslutt shell og start nytt.

    ruby -v # => ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.0]

    gem update --system
    gem --version # =>
    gem --version # => # 2.0.0

  6. msolli revised this gist Mar 1, 2013. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,12 @@
    brew update
    brew uninstall openssl readline libyaml gdbm libffi curl-ca-bundle
    brew install openssl readline libyaml gdbm libffi curl-ca-bundle
    brew link openssl --force

    CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl` \
    --with-readline-dir=`brew --prefix readline`" ruby-build 1.9.3-p392 ~/.rubies/ruby-1.9.3-p392
    CFLAGS='-g -O2' CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl` \
    --with-readline-dir=`brew --prefix readline` \
    --with-yaml-dir=`brew --prefix libyaml` \
    --with-gdbm-dir=`brew --prefix gdbm` \
    --with-libffi-dir=`brew --prefix libffi`" ruby-build -v 1.9.3-p392 ~/.rubies/ruby-1.9.3-p392

    echo "ruby-1.9" > .ruby-version

  7. msolli created this gist Mar 1, 2013.
    16 changes: 16 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    brew update
    brew uninstall openssl readline libyaml gdbm libffi curl-ca-bundle
    brew install openssl readline libyaml gdbm libffi curl-ca-bundle
    brew link openssl --force

    CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl` \
    --with-readline-dir=`brew --prefix readline`" ruby-build 1.9.3-p392 ~/.rubies/ruby-1.9.3-p392

    echo "ruby-1.9" > .ruby-version

    # Avslutt shell og start nytt.

    ruby -v # => ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.0]

    gem update --system
    gem --version # =>