Skip to content

Instantly share code, notes, and snippets.

@tagrudev
Last active October 22, 2015 07:59

Revisions

  1. tagrudev revised this gist Oct 22, 2015. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions ruby.md
    Original file line number Diff line number Diff line change
    @@ -24,13 +24,13 @@ This installs rbenv into your home directory, and sets the appropriate environme
    Now we're ready to install Ruby.

    Install Ruby
    Before using rbenv, determine which version of Ruby that you want to install. We will install the latest version, Ruby 2.2.1.
    Before using rbenv, determine which version of Ruby that you want to install. We will install the latest version, Ruby 2.2.3.

    As the user that will be using Ruby, install it with these commands:

    ```bash
    rbenv install -v 2.2.1
    rbenv global 2.2.1
    rbenv install -v 2.2.3
    rbenv global 2.2.3
    ```

    The global sub-command sets the default version of Ruby that all of your shells will use. If you want to install and use a different version, simply run the rbenv commands with a different version number.
  2. tagrudev revised this gist Oct 22, 2015. 1 changed file with 17 additions and 1 deletion.
    18 changes: 17 additions & 1 deletion ruby.md
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,12 @@
    ```bash
    sudo apt-get update
    ```

    sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
    ```

    Now we are ready to install rbenv. The easiest way to do that is to run these commands, as the user that will be using Ruby:

    ``` bash
    cd
    git clone git://github.com/sstephenson/rbenv.git .rbenv
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
    @@ -13,6 +15,8 @@ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
    git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
    echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile
    source ~/.bash_profile
    ```

    Note: On Ubuntu Desktop, replace all occurrences .bash_profile in the above code block with .bashrc.

    This installs rbenv into your home directory, and sets the appropriate environment variables that will allow rbenv to the active version of Ruby.
    @@ -24,17 +28,29 @@ Before using rbenv, determine which version of Ruby that you want to install. We

    As the user that will be using Ruby, install it with these commands:

    ```bash
    rbenv install -v 2.2.1
    rbenv global 2.2.1
    ```

    The global sub-command sets the default version of Ruby that all of your shells will use. If you want to install and use a different version, simply run the rbenv commands with a different version number.

    Verify that Ruby was installed properly with this command:

    ```
    ruby -v
    ```

    It is likely that you will not want Rubygems to generate local documentation for each gem that you install, as this process can be lengthy. To disable this, run this command:

    ```bash
    echo "gem: --no-document" > ~/.gemrc
    ```

    You will also want to install the bundler gem, to manage your application dependencies:

    ```bash
    gem install bundler
    ```

    Now that Ruby is installed, let's install Rails.
  3. tagrudev renamed this gist Oct 22, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. tagrudev created this gist Oct 22, 2015.
    40 changes: 40 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    ```bash
    sudo apt-get update
    ```

    sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
    Now we are ready to install rbenv. The easiest way to do that is to run these commands, as the user that will be using Ruby:

    cd
    git clone git://github.com/sstephenson/rbenv.git .rbenv
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
    echo 'eval "$(rbenv init -)"' >> ~/.bash_profile

    git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
    echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile
    source ~/.bash_profile
    Note: On Ubuntu Desktop, replace all occurrences .bash_profile in the above code block with .bashrc.

    This installs rbenv into your home directory, and sets the appropriate environment variables that will allow rbenv to the active version of Ruby.

    Now we're ready to install Ruby.

    Install Ruby
    Before using rbenv, determine which version of Ruby that you want to install. We will install the latest version, Ruby 2.2.1.

    As the user that will be using Ruby, install it with these commands:

    rbenv install -v 2.2.1
    rbenv global 2.2.1
    The global sub-command sets the default version of Ruby that all of your shells will use. If you want to install and use a different version, simply run the rbenv commands with a different version number.

    Verify that Ruby was installed properly with this command:

    ruby -v
    It is likely that you will not want Rubygems to generate local documentation for each gem that you install, as this process can be lengthy. To disable this, run this command:

    echo "gem: --no-document" > ~/.gemrc
    You will also want to install the bundler gem, to manage your application dependencies:

    gem install bundler
    Now that Ruby is installed, let's install Rails.