Skip to content

Instantly share code, notes, and snippets.

@aduartem
Created March 1, 2016 19:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aduartem/945730bd12220a4a80f4 to your computer and use it in GitHub Desktop.
Save aduartem/945730bd12220a4a80f4 to your computer and use it in GitHub Desktop.
Cómo Instalar Ruby, Ruby on Rails y Capistrano en Debian 7

Cómo Instalar Ruby, Ruby on Rails y Capistrano en Debian 7

Esta guía indica como instalar Ruby 2.3.0 usando chruby + ruby install y Ruby o Rails 4.2.5. Está guía aplica tanto para Debian 7.0 como para Ubuntu 14.04, pero probablemente sirve para otras distribuciones Linux, incluyendo versiones más recientes de Ubuntu y Debian.

Primero que todo actualizar el listado de paquetes disponibles:

sudo apt-get update

build-essential

$ sudo apt-get install build-essential

ruby-install

$ wget -O ruby-install-0.6.0.tar.gz \
  https://github.com/postmodern/ruby-install/archive/v0.6.0.tar.gz
$ tar -xzvf ruby-install-0.6.0.tar.gz
$ cd ruby-install-0.6.0/
$ sudo make install
$ ruby-install -V

output:

ruby-install: 0.6.0

Ruby

$ ruby-install --latest ruby 2.3.0
$ wget -O chruby-0.3.9.tar.gz \
  https://github.com/postmodern/chruby/archive/v0.3.9.tar.gz
$ tar -xzvf chruby-0.3.9.tar.gz
$ cd chruby-0.3.9/
$ sudo make install
cat >> ~/.$(basename $SHELL)rc <<EOF
source /usr/local/share/chruby/chruby.sh
source /usr/local/share/chruby/auto.sh
EOF
$ exec $SHELL
$ chruby

output:

ruby-2.3.0

Crear archivo ~/.ruby-version con este contenido:

ruby-2.3.0

En la línea de comandos ingresar:

$ chruby ruby-2.3.0
$ ruby -v

Si todo está ok, se imprimirá en la terminal lo siguiente:

ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]

Rails

Para instalar Ruby on Rails ingresar el siguiente comando:

$ gem install rails -v 4.2.5 --no-rdoc --no-ri

Capistrano

Para instalar Capistrano ingresar el siguiente comando:

$ gem install capistrano

Fuente: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment