Skip to content

Instantly share code, notes, and snippets.

@Altons
Forked from blacktm/install_ruby_rpi.sh
Created July 22, 2018 21:13
Show Gist options
  • Select an option

  • Save Altons/2b70f61a6fc659fe9d5fe7cea1bb3687 to your computer and use it in GitHub Desktop.

Select an option

Save Altons/2b70f61a6fc659fe9d5fe7cea1bb3687 to your computer and use it in GitHub Desktop.

Revisions

  1. @blacktm blacktm revised this gist Apr 3, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -50,10 +50,10 @@ sudo apt update
    sudo apt install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev

    # Install Ruby 2.5, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.5.0 --verbose
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.5.1 --verbose

    # Set Ruby 2.5 as the global default
    rbenv global 2.5.0
    rbenv global 2.5.1

    # Don't install docs for gems (saves lots of time)
    echo "gem: --no-document" > ~/.gemrc
  2. @blacktm blacktm revised this gist Dec 28, 2017. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,15 @@
    #!/bin/bash

    # --------------------------------------------------------------------------------------------
    # Installs Ruby 2.4 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
    # Installs Ruby 2.5 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
    #
    # Run from the web:
    # bash <(curl -s https://gist.github.com/blacktm/8302741/raw/install_ruby_rpi.sh)
    # --------------------------------------------------------------------------------------------

    # Welcome message
    echo -e "
    This will install Ruby 2.4 using rbenv/ruby-build.
    This will install Ruby 2.5 using rbenv/ruby-build.
    It will take about 2 hours to compile on the original Raspberry Pi,
    35 minutes on the second generation, and 16 minutes on the third.\n"
    @@ -49,11 +49,11 @@ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
    sudo apt update
    sudo apt install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev

    # Install Ruby 2.4, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.4.2 --verbose
    # Install Ruby 2.5, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.5.0 --verbose

    # Set Ruby 2.4 as the global default
    rbenv global 2.4.2
    # Set Ruby 2.5 as the global default
    rbenv global 2.5.0

    # Don't install docs for gems (saves lots of time)
    echo "gem: --no-document" > ~/.gemrc
  3. @blacktm blacktm revised this gist Sep 19, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -50,10 +50,10 @@ sudo apt update
    sudo apt install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev

    # Install Ruby 2.4, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.4.1 --verbose
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.4.2 --verbose

    # Set Ruby 2.4 as the global default
    rbenv global 2.4.1
    rbenv global 2.4.2

    # Don't install docs for gems (saves lots of time)
    echo "gem: --no-document" > ~/.gemrc
  4. @blacktm blacktm revised this gist Apr 8, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -50,10 +50,10 @@ sudo apt update
    sudo apt install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev

    # Install Ruby 2.4, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.4.0 --verbose
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.4.1 --verbose

    # Set Ruby 2.4 as the global default
    rbenv global 2.4.0
    rbenv global 2.4.1

    # Don't install docs for gems (saves lots of time)
    echo "gem: --no-document" > ~/.gemrc
  5. @blacktm blacktm revised this gist Mar 4, 2017. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    #!/bin/bash

    # -----------------------------------------------------------------------
    # --------------------------------------------------------------------------------------------
    # Installs Ruby 2.4 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
    #
    # Run from the web:
    # bash <(curl -s raw_script_url_here)
    # -----------------------------------------------------------------------
    # bash <(curl -s https://gist.github.com/blacktm/8302741/raw/install_ruby_rpi.sh)
    # --------------------------------------------------------------------------------------------

    # Welcome message
    echo -e "
  6. @blacktm blacktm revised this gist Dec 26, 2016. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,15 @@
    #!/bin/bash

    # -----------------------------------------------------------------------
    # Installs Ruby 2.3 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
    # Installs Ruby 2.4 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
    #
    # Run from the web:
    # bash <(curl -s raw_script_url_here)
    # -----------------------------------------------------------------------

    # Welcome message
    echo -e "
    This will install Ruby 2.3 using rbenv/ruby-build.
    This will install Ruby 2.4 using rbenv/ruby-build.
    It will take about 2 hours to compile on the original Raspberry Pi,
    35 minutes on the second generation, and 16 minutes on the third.\n"
    @@ -49,11 +49,11 @@ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
    sudo apt update
    sudo apt install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev

    # Install Ruby 2.3, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.3.3 --verbose
    # Install Ruby 2.4, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.4.0 --verbose

    # Set Ruby 2.3 as the global default
    rbenv global 2.3.3
    # Set Ruby 2.4 as the global default
    rbenv global 2.4.0

    # Don't install docs for gems (saves lots of time)
    echo "gem: --no-document" > ~/.gemrc
  7. @blacktm blacktm revised this gist Nov 21, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -50,10 +50,10 @@ sudo apt update
    sudo apt install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev

    # Install Ruby 2.3, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.3.2 --verbose
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.3.3 --verbose

    # Set Ruby 2.3 as the global default
    rbenv global 2.3.2
    rbenv global 2.3.3

    # Don't install docs for gems (saves lots of time)
    echo "gem: --no-document" > ~/.gemrc
  8. @blacktm blacktm revised this gist Nov 18, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -50,10 +50,10 @@ sudo apt update
    sudo apt install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev

    # Install Ruby 2.3, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.3.1 --verbose
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.3.2 --verbose

    # Set Ruby 2.3 as the global default
    rbenv global 2.3.1
    rbenv global 2.3.2

    # Don't install docs for gems (saves lots of time)
    echo "gem: --no-document" > ~/.gemrc
  9. @blacktm blacktm revised this gist Oct 18, 2016. 1 changed file with 6 additions and 2 deletions.
    8 changes: 6 additions & 2 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -38,8 +38,8 @@ EOF
    # Save to ~/.bashrc
    echo -e "\n${String}" >> ~/.bashrc

    # Reload current shell
    source ~/.bashrc
    # Enable rbenv for current shell
    eval "${String}"

    # Install ruby-build as an rbenv plugin, adds `rbenv install` command
    git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
    @@ -58,6 +58,10 @@ rbenv global 2.3.1
    # Don't install docs for gems (saves lots of time)
    echo "gem: --no-document" > ~/.gemrc

    # Reminder to reload the shell
    echo -e "\nReload the current shell to get access to rbenv using:"
    echo " source ~/.bashrc"

    # Print the time elapsed
    ELAPSED_TIME=$(($SECONDS - $START_TIME))
    echo -e "\nFinished in $(($ELAPSED_TIME/60/60)) hr, $(($ELAPSED_TIME/60%60)) min, and $(($ELAPSED_TIME%60)) sec\n"
  10. @blacktm blacktm revised this gist Oct 6, 2016. 1 changed file with 13 additions and 14 deletions.
    27 changes: 13 additions & 14 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -7,13 +7,12 @@
    # bash <(curl -s raw_script_url_here)
    # -----------------------------------------------------------------------

    # Set up variables
    bold="\033[1m"
    normal="\033[0m"

    # Welcome message
    echo -e "\n${bold}This will install Ruby 2.3 using rbenv/ruby-build."
    echo -e "It can take about 2 hours to compile on the Raspberry Pi.${normal}"
    echo -e "
    This will install Ruby 2.3 using rbenv/ruby-build.
    It will take about 2 hours to compile on the original Raspberry Pi,
    35 minutes on the second generation, and 16 minutes on the third.\n"

    # Prompt to continue
    read -p " Continue? (y/n) " ans
    @@ -36,19 +35,19 @@ export PATH="$HOME/.rbenv/bin:$PATH"
    eval "$(rbenv init -)"
    EOF

    # For new shells
    echo -e "\n${String}\n" >> ~/.bashrc
    # Save to ~/.bashrc
    echo -e "\n${String}" >> ~/.bashrc

    # For current shell
    eval "${String}"
    # Reload current shell
    source ~/.bashrc

    # Install ruby-build as an rbenv plugin, adds `rbenv install` command
    git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build

    # Install dependencies
    # See: https://github.com/rbenv/ruby-build/wiki#suggested-build-environment
    sudo apt-get update
    sudo apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev
    sudo apt update
    sudo apt install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev

    # Install Ruby 2.3, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.3.1 --verbose
    @@ -57,8 +56,8 @@ CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.3.1 --ver
    rbenv global 2.3.1

    # Don't install docs for gems (saves lots of time)
    echo -e "gem: --no-document" > ~/.gemrc
    echo "gem: --no-document" > ~/.gemrc

    # Print the time elapsed
    ELAPSED_TIME=$(($SECONDS - $START_TIME))
    echo -e "\n${bold}Finished in $(($ELAPSED_TIME/60/60)) hr, $(($ELAPSED_TIME/60%60)) min, and $(($ELAPSED_TIME%60)) sec${normal}\n"
    echo -e "\nFinished in $(($ELAPSED_TIME/60/60)) hr, $(($ELAPSED_TIME/60%60)) min, and $(($ELAPSED_TIME%60)) sec\n"
  11. @blacktm blacktm revised this gist Apr 26, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -51,10 +51,10 @@ sudo apt-get update
    sudo apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev

    # Install Ruby 2.3, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.3.0 --verbose
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.3.1 --verbose

    # Set Ruby 2.3 as the global default
    rbenv global 2.3.0
    rbenv global 2.3.1

    # Don't install docs for gems (saves lots of time)
    echo -e "gem: --no-document" > ~/.gemrc
  12. @blacktm blacktm revised this gist Jan 1, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -46,7 +46,7 @@ eval "${String}"
    git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build

    # Install dependencies
    # See: https://github.com/sstephenson/ruby-build/wiki#suggested-build-environment
    # See: https://github.com/rbenv/ruby-build/wiki#suggested-build-environment
    sudo apt-get update
    sudo apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev

  13. @blacktm blacktm revised this gist Jan 1, 2016. No changes.
  14. @blacktm blacktm revised this gist Jan 1, 2016. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,7 @@ echo
    START_TIME=$SECONDS

    # Check out rbenv into ~/.rbenv
    git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
    git clone https://github.com/rbenv/rbenv.git ~/.rbenv

    # Add ~/.rbenv/bin to $PATH, enable shims and autocompletion
    read -d '' String <<"EOF"
    @@ -43,12 +43,12 @@ echo -e "\n${String}\n" >> ~/.bashrc
    eval "${String}"

    # Install ruby-build as an rbenv plugin, adds `rbenv install` command
    git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
    git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build

    # Install dependencies
    # See: https://github.com/sstephenson/ruby-build/wiki#suggested-build-environment
    sudo apt-get update
    sudo apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev
    sudo apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev

    # Install Ruby 2.3, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.3.0 --verbose
  15. @blacktm blacktm revised this gist Dec 25, 2015. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/bash

    # -----------------------------------------------------------------------
    # Installs Ruby 2.2 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
    # Installs Ruby 2.3 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
    #
    # Run from the web:
    # bash <(curl -s raw_script_url_here)
    @@ -12,7 +12,7 @@ bold="\033[1m"
    normal="\033[0m"

    # Welcome message
    echo -e "\n${bold}This will install Ruby 2.2 using rbenv/ruby-build."
    echo -e "\n${bold}This will install Ruby 2.3 using rbenv/ruby-build."
    echo -e "It can take about 2 hours to compile on the Raspberry Pi.${normal}"

    # Prompt to continue
    @@ -50,11 +50,11 @@ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-bu
    sudo apt-get update
    sudo apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev

    # Install Ruby 2.2, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.2.4 --verbose
    # Install Ruby 2.3, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.3.0 --verbose

    # Set Ruby 2.2 as the global default
    rbenv global 2.2.4
    # Set Ruby 2.3 as the global default
    rbenv global 2.3.0

    # Don't install docs for gems (saves lots of time)
    echo -e "gem: --no-document" > ~/.gemrc
  16. @blacktm blacktm revised this gist Dec 17, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -51,10 +51,10 @@ sudo apt-get update
    sudo apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev

    # Install Ruby 2.2, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.2.3 --verbose
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.2.4 --verbose

    # Set Ruby 2.2 as the global default
    rbenv global 2.2.3
    rbenv global 2.2.4

    # Don't install docs for gems (saves lots of time)
    echo -e "gem: --no-document" > ~/.gemrc
  17. @blacktm blacktm revised this gist Sep 5, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -51,7 +51,7 @@ sudo apt-get update
    sudo apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev

    # Install Ruby 2.2, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc" rbenv install 2.2.3 --verbose
    CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 2.2.3 --verbose

    # Set Ruby 2.2 as the global default
    rbenv global 2.2.3
  18. @blacktm blacktm revised this gist Sep 5, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -51,10 +51,10 @@ sudo apt-get update
    sudo apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev

    # Install Ruby 2.2, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc" rbenv install 2.2.2 --verbose
    CONFIGURE_OPTS="--disable-install-doc" rbenv install 2.2.3 --verbose

    # Set Ruby 2.2 as the global default
    rbenv global 2.2.2
    rbenv global 2.2.3

    # Don't install docs for gems (saves lots of time)
    echo -e "gem: --no-document" > ~/.gemrc
  19. Tom Black revised this gist Apr 14, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -51,10 +51,10 @@ sudo apt-get update
    sudo apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev

    # Install Ruby 2.2, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc" rbenv install 2.2.1 --verbose
    CONFIGURE_OPTS="--disable-install-doc" rbenv install 2.2.2 --verbose

    # Set Ruby 2.2 as the global default
    rbenv global 2.2.1
    rbenv global 2.2.2

    # Don't install docs for gems (saves lots of time)
    echo -e "gem: --no-document" > ~/.gemrc
  20. Tom Black revised this gist Apr 3, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -51,10 +51,10 @@ sudo apt-get update
    sudo apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev

    # Install Ruby 2.2, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc" rbenv install 2.2.0 --verbose
    CONFIGURE_OPTS="--disable-install-doc" rbenv install 2.2.1 --verbose

    # Set Ruby 2.2 as the global default
    rbenv global 2.2.0
    rbenv global 2.2.1

    # Don't install docs for gems (saves lots of time)
    echo -e "gem: --no-document" > ~/.gemrc
  21. @blacktm blacktm revised this gist Dec 27, 2014. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/bash

    # -----------------------------------------------------------------------
    # Installs Ruby 2.1 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
    # Installs Ruby 2.2 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
    #
    # Run from the web:
    # bash <(curl -s raw_script_url_here)
    @@ -12,7 +12,7 @@ bold="\033[1m"
    normal="\033[0m"

    # Welcome message
    echo -e "\n${bold}This will install Ruby 2.1 using rbenv/ruby-build."
    echo -e "\n${bold}This will install Ruby 2.2 using rbenv/ruby-build."
    echo -e "It can take about 2 hours to compile on the Raspberry Pi.${normal}"

    # Prompt to continue
    @@ -50,11 +50,11 @@ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-bu
    sudo apt-get update
    sudo apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev

    # Install Ruby 2.1, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc" rbenv install 2.1.5 --verbose
    # Install Ruby 2.2, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc" rbenv install 2.2.0 --verbose

    # Set Ruby 2.1 as the global default
    rbenv global 2.1.5
    # Set Ruby 2.2 as the global default
    rbenv global 2.2.0

    # Don't install docs for gems (saves lots of time)
    echo -e "gem: --no-document" > ~/.gemrc
  22. @blacktm blacktm revised this gist Nov 28, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -51,10 +51,10 @@ sudo apt-get update
    sudo apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev

    # Install Ruby 2.1, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc" rbenv install 2.1.3 --verbose
    CONFIGURE_OPTS="--disable-install-doc" rbenv install 2.1.5 --verbose

    # Set Ruby 2.1 as the global default
    rbenv global 2.1.3
    rbenv global 2.1.5

    # Don't install docs for gems (saves lots of time)
    echo -e "gem: --no-document" > ~/.gemrc
  23. @blacktm blacktm revised this gist Oct 15, 2014. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    #!/bin/bash

    # -----------------------------------------------------------------------
    # Installs Ruby 2.1 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
    #
  24. @blacktm blacktm revised this gist Oct 13, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    # Installs Ruby 2.1 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
    #
    # Run from the web:
    # source <(curl -s raw_script_url_here)
    # bash <(curl -s raw_script_url_here)
    # -----------------------------------------------------------------------

    # Set up variables
  25. @blacktm blacktm revised this gist Oct 13, 2014. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    # ------------------------------------------------------------
    # Installs Ruby 2.1 using rbenv/ruby-build on the Raspberry Pi
    # -----------------------------------------------------------------------
    # Installs Ruby 2.1 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
    #
    # Run from the web:
    # source <(curl -s raw_script_url_here)
    # ------------------------------------------------------------
    # -----------------------------------------------------------------------

    # Set up variables
    bold="\033[1m"
  26. @blacktm blacktm revised this gist Oct 13, 2014. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,8 @@
    # ------------------------------------------------------------
    # Installs Ruby 2.1 using rbenv/ruby-build on the Raspberry Pi
    #
    # Run from the web:
    # source <(curl -s raw_script_url_here)
    # ------------------------------------------------------------

    # Set up variables
  27. @blacktm blacktm revised this gist Oct 13, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -43,7 +43,7 @@ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-bu
    # Install dependencies
    # See: https://github.com/sstephenson/ruby-build/wiki#suggested-build-environment
    sudo apt-get update
    sudo apt-get install -y build-essential autoconf libssl-dev libyaml-dev libreadline6 libreadline6-dev zlib1g zlib1g-dev
    sudo apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev

    # Install Ruby 2.1, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc" rbenv install 2.1.3 --verbose
  28. @blacktm blacktm revised this gist Oct 11, 2014. 1 changed file with 10 additions and 6 deletions.
    16 changes: 10 additions & 6 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -2,12 +2,13 @@
    # Installs Ruby 2.1 using rbenv/ruby-build on the Raspberry Pi
    # ------------------------------------------------------------

    # Welcome message
    cat <<EOF
    # Set up variables
    bold="\033[1m"
    normal="\033[0m"

    This will install Ruby 2.1 using rbenv/ruby-build.
    It can take up to 2 hours to compile on the Raspberry Pi.
    EOF
    # Welcome message
    echo -e "\n${bold}This will install Ruby 2.1 using rbenv/ruby-build."
    echo -e "It can take about 2 hours to compile on the Raspberry Pi.${normal}"

    # Prompt to continue
    read -p " Continue? (y/n) " ans
    @@ -50,6 +51,9 @@ CONFIGURE_OPTS="--disable-install-doc" rbenv install 2.1.3 --verbose
    # Set Ruby 2.1 as the global default
    rbenv global 2.1.3

    # Don't install docs for gems (saves lots of time)
    echo -e "gem: --no-document" > ~/.gemrc

    # Print the time elapsed
    ELAPSED_TIME=$(($SECONDS - $START_TIME))
    echo -e "\nFinished in $(($ELAPSED_TIME/60/60)) hr, $(($ELAPSED_TIME/60%60)) min, and $(($ELAPSED_TIME%60)) sec\n"
    echo -e "\n${bold}Finished in $(($ELAPSED_TIME/60/60)) hr, $(($ELAPSED_TIME/60%60)) min, and $(($ELAPSED_TIME%60)) sec${normal}\n"
  29. @blacktm blacktm revised this gist Oct 11, 2014. 1 changed file with 7 additions and 6 deletions.
    13 changes: 7 additions & 6 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -24,16 +24,17 @@ START_TIME=$SECONDS
    git clone https://github.com/sstephenson/rbenv.git ~/.rbenv

    # Add ~/.rbenv/bin to $PATH, enable shims and autocompletion
    read -d '' String <<"EOF"
    # rbenv
    export PATH="$HOME/.rbenv/bin:$PATH"
    eval "$(rbenv init -)"
    EOF

    # Add same rbenv config to new shells
    cat >> ~/.bashrc <<EOL
    # For new shells
    echo -e "\n${String}\n" >> ~/.bashrc

    # rbenv
    export PATH="$HOME/.rbenv/bin:$PATH"
    eval "$(rbenv init -)"
    EOL
    # For current shell
    eval "${String}"

    # Install ruby-build as an rbenv plugin, adds `rbenv install` command
    git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
  30. @blacktm blacktm revised this gist Oct 11, 2014. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions install_ruby_rpi.sh
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@
    cat <<EOF
    This will install Ruby 2.1 using rbenv/ruby-build.
    It can take up to 2 hours to compile Ruby on the Raspberry Pi.
    It can take up to 2 hours to compile on the Raspberry Pi.
    EOF

    # Prompt to continue
    @@ -44,10 +44,10 @@ sudo apt-get update
    sudo apt-get install -y build-essential autoconf libssl-dev libyaml-dev libreadline6 libreadline6-dev zlib1g zlib1g-dev

    # Install Ruby 2.1, don't generate RDoc to save lots of time
    CONFIGURE_OPTS="--disable-install-doc" rbenv install 2.1.1 --verbose
    CONFIGURE_OPTS="--disable-install-doc" rbenv install 2.1.3 --verbose

    # Set Ruby 2.1 as the global default
    rbenv global 2.1.1
    rbenv global 2.1.3

    # Print the time elapsed
    ELAPSED_TIME=$(($SECONDS - $START_TIME))