<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7171548331369560991</id><updated>2024-09-04T17:09:29.733-05:00</updated><category term="Programación"/><category term="Ruby"/><category term="Tips"/><category term="Ruby on Rails"/><category term="JavaScript"/><category term="HTML5"/><category term="PostgreSQL"/><category term="Git"/><category term="Guias"/><category term="JRuby"/><category term="Java"/><category term="Node.js"/><category term="PHP"/><category term="Proyectos"/><title type='text'>Gerardo Ortega - Blog</title><subtitle type='html'>Ruby (Rails), Java, JavaScript, PostgreSQL, Cloud, Ubuntu :)</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.g3ortega.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>27</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-111225128441415954</id><published>2014-02-09T15:14:00.000-06:00</published><updated>2014-02-09T21:38:39.584-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programación"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby on Rails"/><title type='text'>Desplegando Ruby on Rails en VPS (Unicorn + Nginx + Capistrano) con Ubuntu Server</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQrVksrTcbNT8MuPhZGRWLvfawzxaxb3C8vqEMWX9Sh4FAAlhUwJkU-xqKQpgyLvMF81OpXPUijcntTHdNAqZw_kgpmyuTpIsP6KG5l01y_u9aSpr__zAkuRk6KNhOuvYExD5Il0ghjp7L/s1600/ubuntu-ruby-rails-nginx-unicorn.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQrVksrTcbNT8MuPhZGRWLvfawzxaxb3C8vqEMWX9Sh4FAAlhUwJkU-xqKQpgyLvMF81OpXPUijcntTHdNAqZw_kgpmyuTpIsP6KG5l01y_u9aSpr__zAkuRk6KNhOuvYExD5Il0ghjp7L/s1600/ubuntu-ruby-rails-nginx-unicorn.jpg&quot; height=&quot;130&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

Hoy abordaremos como desplegar una aplicación hecha en Ruby on Rails en un VPS. En mi caso usando Digital Ocean como proveedor. Comencemos:&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;
&lt;br /&gt;Primero accedemos vía SSH a nuestro servidor, si aún no a has configurado y asegurado el acceso SSH a tu VPS puedes &lt;a href=&quot;http://blog.g3ortega.com/2014/02/instalando-y-configurando-postgresql-en.html&quot; target=&quot;_blank&quot;&gt;visitar un post donde explico como hacerlo.&lt;/a&gt;&amp;nbsp;Si ya tienes todo listo entonces procedemos.&lt;br /&gt;
&lt;h3&gt;
Configuraciones en el Servidor&lt;/h3&gt;
&lt;pre&gt; ssh -p numero-de-puerto nombre-de-usuario@123.123.123.123 &lt;/pre&gt;
Si no lo hemos hecho aún, actualizamos los paquetes e instalamos curl
&lt;br /&gt;
&lt;pre&gt;sudo apt-get update
sudo apt-get install curl
&lt;/pre&gt;
Instalamos la última versión estable de la RVM (Ruby Version Manager)
&lt;br /&gt;
&lt;pre&gt;curl -L get.rvm.io | bash -s stable
&lt;/pre&gt;
Cargamos la RVM
&lt;br /&gt;
&lt;pre&gt;source ~/.rvm/scripts/rvm
&lt;/pre&gt;
Instalamos las dependencias de la RVM
&lt;br /&gt;
&lt;pre&gt;rvm requirements
&lt;/pre&gt;
Instalamos Ruby 2.0.0 (o bien podemos instalar la 2.1.0)
&lt;br /&gt;
&lt;pre&gt;rvm install 2.0.0
&lt;/pre&gt;
Usamos la version 2.0.0 por defecto en RVM
&lt;br /&gt;
&lt;pre&gt;rvm use 2.0.0 --default
&lt;/pre&gt;
Intalamos la última versión de rubygems en caso que RVM no la tenga aún
&lt;br /&gt;
&lt;pre&gt;rvm rubygems current
&lt;/pre&gt;
Instalamos la gema de Rails, junto a Git, Bundler y NodeJS (necesario para las compilaciones de assets)
&lt;br /&gt;
&lt;pre&gt;gem install rails --no-ri --no-rdoc
sudo apt-get install git-core
gem install bundler
&lt;/pre&gt;
**En caso que necesitemos instalar una versión especifica de Rails y no la más reciente (lo cual es lo recomendado) podemos hacerlo indicando que versión queremos.
&lt;br /&gt;
&lt;pre&gt;gem install rails -v 3.2.14
&lt;/pre&gt;
Instalamos nuestro motor de base de datos, yo uso y recomiendo PostgreSQL, así que los siguientes pasos serán para instalarlo y configurarlo con Rails.
&lt;br /&gt;
&lt;pre&gt;sudo apt-get install postgresql postgresql-server-dev-9.1
gem install pg -- --with-pg-config=/usr/bin/pg_config
&lt;/pre&gt;
Creamos un nuevo usuario en postgres (cambiar los campos correspondientes)
&lt;br /&gt;
&lt;pre&gt;sudo -u postgres psql
create user nuevo-usuario with password &#39;contrasenia&#39;;
alter role nuevo-usuario superuser createrole createdb replication;
create database nombre_del_proyecto_production owner nuevo-usuario;
&lt;/pre&gt;
Instalamos Nginx
&lt;br /&gt;
&lt;pre&gt;sudo apt-get install nginx
nginx -h
cat /etc/init.d/nginx
/etc/init.d/nginx -h
sudo service nginx start
cd /etc/nginx
&lt;/pre&gt;
&lt;h3&gt;
Configuración Local
&lt;/h3&gt;
Comenzamos agregando Unicorn al Gemfile
&lt;br /&gt;
&lt;pre&gt;gem &#39;unicorn&#39;
&lt;/pre&gt;
Ahora creamos los siguientes archivos en el directorio /config
* unicorn.rb
* unicorn_init.sh
* nginx.conf
&lt;br /&gt;
Una vez creada, asignamos permisos de ejecución a unicorn_init.sh
&lt;br /&gt;
&lt;pre&gt;chmod +x config/unicorn_init.sh
&lt;/pre&gt;
Agregamos la configuración de Nginx el archivo que hemos creado en el directorio /conf llamado nginx.conf (cambia nombre_de_proyecto y nombre_de_usuario con tus datos, el nombre del proyecto correspondería al nombre que le hayas asignado a tu aplicación de rails y el nombre de usuario es con el que accedes al servidor y por ende tiene asignado un directorio en la carpeta /home/nombre_de_usuario...)
&lt;br /&gt;
&lt;pre&gt;upstream unicorn {
  server unix:/tmp/unicorn.nombre_de_proyecto.sock fail_timeout=0;
}

server {
  listen 80 default_server deferred;
  # server_name example.com;
  root /home/nombre_de_usuario/apps/nombre_de_proyecto/current/public;

  location ^~ /assets/ {
    gzip_static on;
    expires max;
    add_header Cache-Control public;
  }

  try_files $uri/index.html $uri @unicorn;
  location @unicorn {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_redirect off;
    proxy_pass http://unicorn;
  }

  error_page 500 502 503 504 /500.html;
  client_max_body_size 20M;
  keepalive_timeout 10;
}
&lt;/pre&gt;
Ahora editamos el archivo conf/unicorn.rb (recuerda cambiar nombre_de_proyecto y nombre_de_usuario conforme a tus datos). También puedes editar el número de workers que deseas que tenga tu aplicación, de momento solo he incluido dos.
&lt;br /&gt;
&lt;pre&gt;root = &quot;/home/nombre_de_usuario/apps/nombre_de_proyecto/current&quot;
working_directory root
pid &quot;#{root}/tmp/pids/unicorn.pid&quot;
stderr_path &quot;#{root}/log/unicorn.log&quot;
stdout_path &quot;#{root}/log/unicorn.log&quot;

listen &quot;/tmp/unicorn.nombre_de_protecto.sock&quot;
worker_processes 2
timeout 30

# Force the bundler gemfile environment variable to
# reference the capistrano &quot;current&quot; symlink
before_exec do |_|
  ENV[&quot;BUNDLE_GEMFILE&quot;] = File.join(root, &#39;Gemfile&#39;)
end
&lt;/pre&gt;
Editamos el archivo config/unicorn_init.sh (nuevamente recuerda cambiar el nombre_de_usuario y nombre_de_proyecto)
&lt;br /&gt;
&lt;pre&gt;#!/bin/sh
### BEGIN INIT INFO
# Provides:          unicorn
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Manage unicorn server
# Description:       Start, stop, restart unicorn server for a specific application.
### END INIT INFO
set -e

# Feel free to change any of the following variables for your app:
TIMEOUT=${TIMEOUT-60}
APP_ROOT=/home/nombre_de_usuario/apps/nombre_de_proyecto/current
PID=$APP_ROOT/tmp/pids/unicorn.pid
CMD=&quot;cd $APP_ROOT; bundle exec unicorn -D -c $APP_ROOT/config/unicorn.rb -E production&quot;
AS_USER=nombre_de_usuario
set -u

OLD_PIN=&quot;$PID.oldbin&quot;

sig () {
  test -s &quot;$PID&quot; &amp;amp;&amp;amp; kill -$1 `cat $PID`
}

oldsig () {
  test -s $OLD_PIN &amp;amp;&amp;amp; kill -$1 `cat $OLD_PIN`
}

run () {
  if [ &quot;$(id -un)&quot; = &quot;$AS_USER&quot; ]; then
    eval $1
  else
    su -c &quot;$1&quot; - $AS_USER
  fi
}

case &quot;$1&quot; in
start)
  sig 0 &amp;amp;&amp;amp; echo &amp;gt;&amp;amp;2 &quot;Already running&quot; &amp;amp;&amp;amp; exit 0
  run &quot;$CMD&quot;
  ;;
stop)
  sig QUIT &amp;amp;&amp;amp; exit 0
  echo &amp;gt;&amp;amp;2 &quot;Not running&quot;
  ;;
force-stop)
  sig TERM &amp;amp;&amp;amp; exit 0
  echo &amp;gt;&amp;amp;2 &quot;Not running&quot;
  ;;
restart|reload)
  sig HUP &amp;amp;&amp;amp; echo reloaded OK &amp;amp;&amp;amp; exit 0
  echo &amp;gt;&amp;amp;2 &quot;Couldn&#39;t reload, starting &#39;$CMD&#39; instead&quot;
  run &quot;$CMD&quot;
  ;;
upgrade)
  if sig USR2 &amp;amp;&amp;amp; sleep 2 &amp;amp;&amp;amp; sig 0 &amp;amp;&amp;amp; oldsig QUIT
  then
    n=$TIMEOUT
    while test -s $OLD_PIN &amp;amp;&amp;amp; test $n -ge 0
    do
      printf &#39;.&#39; &amp;amp;&amp;amp; sleep 1 &amp;amp;&amp;amp; n=$(( $n - 1 ))
    done
    echo

    if test $n -lt 0 &amp;amp;&amp;amp; test -s $OLD_PIN
    then
      echo &amp;gt;&amp;amp;2 &quot;$OLD_PIN still exists after $TIMEOUT seconds&quot;
      exit 1
    fi
    exit 0
  fi
  echo &amp;gt;&amp;amp;2 &quot;Couldn&#39;t upgrade, starting &#39;$CMD&#39; instead&quot;
  run &quot;$CMD&quot;
  ;;
reopen-logs)
  sig USR1
  ;;
*)
  echo &amp;gt;&amp;amp;2 &quot;Usage: $0 &lt;start force-stop=&quot;&quot; reopen-logs=&quot;&quot; restart=&quot;&quot; stop=&quot;&quot; upgrade=&quot;&quot;&gt;&quot;
  exit 1
  ;;
esac

&lt;/start&gt;&lt;/pre&gt;
&lt;h4&gt;
Configuración de Capistrano

&lt;/h4&gt;
Agregamos Capistrano y Capistrano RVM al Gemfile
&lt;br /&gt;
&lt;pre&gt;gem &#39;capistrano&#39;
gem &#39;rvm-capistrano&#39;
&lt;/pre&gt;
Despues de haber ejecutado bundle install para instalar las gemas correspondientes ejecutamos el siguiente comando en el directorio principal de nuestra aplicación
&lt;br /&gt;
&lt;pre&gt;capify .
&lt;/pre&gt;
Editamos (creamos en caso que no lo tengamos) el archivo deploy.rb en el directorio /config y agregamos la siguiente receta(recuerda sustituir los valores correspondientes conforme a los tu configuración):
&lt;br /&gt;
&lt;pre&gt;require &quot;bundler/capistrano&quot;
require &quot;rvm/capistrano&quot;

server &quot;123.123.123.123&quot;, :web, :app, :db, primary: true

set :application, &quot;nombre_del_proyecto&quot;
set :user, &quot;nombre de usuario&quot;
set :port, 22 #sustituye con el puerto que usas
set :deploy_to, &quot;/home/#{user}/apps/#{application}&quot;
set :deploy_via, :remote_cache
set :use_sudo, false

set :scm, &quot;git&quot;
set :repository, &quot;git@github.com:username/#{application}.git&quot; #o simplemente copia y pega la url del repositorio en el servicio que uses
set :branch, &quot;master&quot;


default_run_options[:pty] = true
ssh_options[:forward_agent] = true

after &quot;deploy&quot;, &quot;deploy:cleanup&quot; # keep only the last 5 releases

namespace :deploy do
  %w[start stop restart].each do |command|
    desc &quot;#{command} unicorn server&quot;
    task command, roles: :app, except: {no_release: true} do
      run &quot;/etc/init.d/unicorn_#{application} #{command}&quot;
    end
  end

  task :setup_config, roles: :app do
    sudo &quot;ln -nfs #{current_path}/config/nginx.conf /etc/nginx/sites-enabled/#{application}&quot;
    sudo &quot;ln -nfs #{current_path}/config/unicorn_init.sh /etc/init.d/unicorn_#{application}&quot;
    run &quot;mkdir -p #{shared_path}/config&quot;
    put File.read(&quot;config/database.example.yml&quot;), &quot;#{shared_path}/config/database.yml&quot;
    puts &quot;Now edit the config files in #{shared_path}.&quot;
  end
  after &quot;deploy:setup&quot;, &quot;deploy:setup_config&quot;

  task :symlink_config, roles: :app do
    run &quot;ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml&quot;
  end
  after &quot;deploy:finalize_update&quot;, &quot;deploy:symlink_config&quot;

  desc &quot;Make sure local git is in sync with remote.&quot;
  task :check_revision, roles: :web do
    unless `git rev-parse HEAD` == `git rev-parse origin/master`
      puts &quot;WARNING: HEAD is not the same as origin/master&quot;
      puts &quot;Run `git push` to sync changes.&quot;
      exit
    end
  end
  before &quot;deploy&quot;, &quot;deploy:check_revision&quot;
end
&lt;/pre&gt;
Ahora edita el archivo Capfile creado en el directorio principal de tu aplicación y verifica que esté de la siguiente manera:
&lt;br /&gt;
&lt;pre&gt;load &#39;deploy&#39;
load &#39;deploy/assets&#39;
load &#39;config/deploy&#39;&lt;/pre&gt;
&lt;h4&gt;
Despliegue&lt;/h4&gt;
&lt;pre&gt;
cap deploy:setup
&lt;/pre&gt;
Edita en el servidor /home/nombre-de-usuario/apps/nombre-de-proyecto/shared/config/database.yml conforme a los datos de conexión en el servidor remoto, en mi caso usando PostgreSQL para el entorno de producción quedaría de la siguiente manera.
&lt;pre&gt;
production:
  adapter: postgresql
  encoding: unicode
  host: localhost
  database: nombre_de_bd_production
  pool: 5
  username: nombre_usuario_en_postgres
  password: &#39;ontrasenia&#39;

&lt;/pre&gt;
Luego de haber ejecutado las configuración inicial y asumiendo que todo esta bien...
&lt;pre&gt;
cap deploy:cold
&lt;/pre&gt;
Luego del deploy:cold
&lt;pre&gt;
sudo rm /etc/nginx/sites-enabled/default
sudo service nginx restart
sudo update-rc.d -f unicorn_nombre_del_proyecto defaults
&lt;/pre&gt;
Por último para cada cambio nuevo que hagamos, hacemos push desde nuestro repositorio local y luego el deploy usando capistrano
&lt;pre&gt;
git push origin master
cap deploy
&lt;/pre&gt;
Eso es todo, si tienes dudas, puedes contactarme o dejar tus comentarios.
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/111225128441415954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/111225128441415954'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2014/02/desplegando-ruby-on-rails-en-vps.html' title='Desplegando Ruby on Rails en VPS (Unicorn + Nginx + Capistrano) con Ubuntu Server'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQrVksrTcbNT8MuPhZGRWLvfawzxaxb3C8vqEMWX9Sh4FAAlhUwJkU-xqKQpgyLvMF81OpXPUijcntTHdNAqZw_kgpmyuTpIsP6KG5l01y_u9aSpr__zAkuRk6KNhOuvYExD5Il0ghjp7L/s72-c/ubuntu-ruby-rails-nginx-unicorn.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-1837505567832407177</id><published>2014-02-09T12:48:00.000-06:00</published><updated>2014-02-09T12:50:11.749-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Guias"/><category scheme="http://www.blogger.com/atom/ns#" term="Programación"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips"/><title type='text'>Usando R desde Ruby (Rserve + rserve-client)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdR9htOKwKiAJfU-sVpfDlGKurt78mfqw1-iqZhy8M3ZX_sJ5lPZhSc2gBgfOSiUgrDfOIjz8Kk6Dmp2ZcP0mnK8nAgp9ksqWBuNpt6d_iAggSaFahp4pg7lsW0rukiIY4OppjPp0Zudk5/s1600/ruby_r_lang.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdR9htOKwKiAJfU-sVpfDlGKurt78mfqw1-iqZhy8M3ZX_sJ5lPZhSc2gBgfOSiUgrDfOIjz8Kk6Dmp2ZcP0mnK8nAgp9ksqWBuNpt6d_iAggSaFahp4pg7lsW0rukiIY4OppjPp0Zudk5/s1600/ruby_r_lang.png&quot; height=&quot;108&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Hace poco escribí un post sobre&lt;a href=&quot;http://blog.g3ortega.com/2014/02/instalando-r-y-rstudio-en-ubuntu-1204.html&quot;&gt; como instalar R y RStudio (en Ubuntu)&lt;/a&gt;, en esta ocasión voy a abordar cómo integrar R con Ruby. De manera que podemos aprovechar todo el potencial de R aplicado al análisis de datos en nuestras aplicaciones hechas en Ruby.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;En resumen esto es lo que haremos:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Asumiendo que ya tenemos instalado R en nuestra computadora, procedemos a instalar Rserve.&lt;/li&gt;
&lt;li&gt;Instalamos el cliente de Ruby para conectarse con Rserve.&lt;/li&gt;
&lt;li&gt;Listo, con esto podemos proceder a hacer pruebas.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Instalando Rserve&lt;/h3&gt;
&lt;div&gt;
Para instalar Rserve, simplemente necesitamos ingresar al R desde la consola (o CRAN) y proceder a instalar R.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7171548331369560991&quot; name=&quot;intro&quot; style=&quot;background-color: white; font-family: meta, arial, helvetica; font-size: 15px; font-weight: bold; text-align: justify;&quot;&gt;&lt;/a&gt;

&lt;b&gt;Desde la consola (Ubuntu)&lt;/b&gt;

&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;pre&gt;sudo R
&amp;gt; install.packages(&quot;Rserve&quot;)
&amp;gt; library(Rserve)
&amp;gt; Rserve()&lt;/pre&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Usando RStudio
&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Los mismos comandos anteriores (solo los que tienen &amp;nbsp;&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfreyhtUqJY657pDqqLaAflq_r6GSysYIjPnVLj_c7UGlsXxk7wc4u4v-xxKiNviz5U8fRwWBInDJi2cdmma_5kWnYb7fOcjASe-JllQP9fjcHziZ_6Sc14KdGAHsUVB12_gcTcPR7cuBn/s1600/rserve_install.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfreyhtUqJY657pDqqLaAflq_r6GSysYIjPnVLj_c7UGlsXxk7wc4u4v-xxKiNviz5U8fRwWBInDJi2cdmma_5kWnYb7fOcjASe-JllQP9fjcHziZ_6Sc14KdGAHsUVB12_gcTcPR7cuBn/s1600/rserve_install.png&quot; height=&quot;361&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
Instalando el cliente de R para Ruby (rserve-client)&lt;/h3&gt;
&lt;pre&gt;gem install rserve-client&lt;/pre&gt;
&lt;h3&gt;
Ahora probamos que todo esté bien desde la terminal con irb&lt;/h3&gt;
&lt;pre&gt;irb
&amp;gt; require &quot;rserve&quot;
&amp;gt; include Rserve
&amp;gt; c = Connection.new
&amp;gt; x = c.eval(&quot;R.version.string&quot;);
&amp;gt; puts x.as_string
&lt;/pre&gt;
&lt;h3&gt;
E incluso podemos hacer algo más avanzado...&lt;/h3&gt;
&lt;pre&gt;&amp;gt; x = c.eval(&#39;list(l1=list(c(2,3)),l2=c(1,2,3))&#39;).to_ruby
&lt;/pre&gt;
Si quieres más información puedes dejar tus comentarios o visita:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;http://www.slideshare.net/sausheong/rubyand-r&lt;/li&gt;
&lt;li&gt;https://github.com/clbustos/Rserve-Ruby-client&lt;/li&gt;
&lt;li&gt;http://www.rforge.net/Rserve/doc.html&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/1837505567832407177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/1837505567832407177'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2014/02/usando-r-desde-ruby-rserve-rserve-client.html' title='Usando R desde Ruby (Rserve + rserve-client)'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdR9htOKwKiAJfU-sVpfDlGKurt78mfqw1-iqZhy8M3ZX_sJ5lPZhSc2gBgfOSiUgrDfOIjz8Kk6Dmp2ZcP0mnK8nAgp9ksqWBuNpt6d_iAggSaFahp4pg7lsW0rukiIY4OppjPp0Zudk5/s72-c/ruby_r_lang.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-6502787788920301713</id><published>2014-02-09T11:02:00.001-06:00</published><updated>2014-02-09T11:05:47.628-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Tips"/><title type='text'>Instalando R y RStudio en Ubuntu 12.04, 12.10, 13.04, 13.10</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl-qdkd0Qi7-Gf27Zj1JHmM0-3EIrZa2PGtVAICczTKIok9Hhw_i4m0sk_MMScqfcOiY4dqNit4vBuFfMBLEu0OFUCdeDZsBO4LajGRMJGL4A0h-nCFQSA7fJmP7zKf1zjwKpIm8flXnML/s1600/r_lang_logo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl-qdkd0Qi7-Gf27Zj1JHmM0-3EIrZa2PGtVAICczTKIok9Hhw_i4m0sk_MMScqfcOiY4dqNit4vBuFfMBLEu0OFUCdeDZsBO4LajGRMJGL4A0h-nCFQSA7fJmP7zKf1zjwKpIm8flXnML/s1600/r_lang_logo.png&quot; height=&quot;153&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Como saben R es el lenguaje de programación para análisis estadístico de datos más usado en el mundo. Ahora veremos como instalarlo en Ubuntu junto a RStudio. Sin más preámbulos comencemos.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;
Instalando R
&lt;/h3&gt;
&lt;pre&gt;sudo add-apt-repository &quot;deb http://cran.rstudio.com/bin/linux/ubuntu $(lsb_release -cs)/&quot;
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo apt-get update
sudo apt-get install r-base r-base-dev
&lt;/pre&gt;
&lt;h3&gt;
Instalando RStudio
&lt;/h3&gt;
Una vez instalados los paquetes anteriores necesarios para ejecutar R procedemos a  instalar RStudio, para esto nos dirigimos al &lt;a href=&quot;http://www.rstudio.com/ide/download/desktop&quot; target=&quot;_blank&quot;&gt;sitio&lt;/a&gt; de descargas de este excelente &lt;a href=&quot;http://www.rstudio.com/ide/download/desktop&quot; target=&quot;_blank&quot;&gt;IDE&lt;/a&gt;. Descargamos la versión acorde a nuestro sistema operativo y hardware, en mi caso he elegido el .deb de 64 bits.

Luego procedemos a instalarlo desde el software center de Ubuntu.

&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhh9DndoMaqpmpRlwbVG8Fo75M3pCZINO5RHNbf_iuyBdcKm5Oajn1QgHHnc3r5XiTWphCjjrsumflnnnCooGFykINQwruPmsU64IKqtxGRJ8IznXZzrngPT4Lp92Jt8TH_Hy1T1EBBCcg/s1600/rstudio_install_ubuntu.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhh9DndoMaqpmpRlwbVG8Fo75M3pCZINO5RHNbf_iuyBdcKm5Oajn1QgHHnc3r5XiTWphCjjrsumflnnnCooGFykINQwruPmsU64IKqtxGRJ8IznXZzrngPT4Lp92Jt8TH_Hy1T1EBBCcg/s1600/rstudio_install_ubuntu.png&quot; height=&quot;240&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Y eso es todo, podemos comenzar a usarlo:

&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR5UoWukBlmuUnftZXp_Xl5yNCX04xOFoUYS2LhNeSRZvHpbON8mNVgyDoeMomxXhzo0zWPVlTM3eP74nQsmAqHB4Ep4gp8sTnrEnxGgIJlTmPhXbSy1UHl5FmW9iEXZlJuSeayiL3m7oH/s1600/rstudio.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR5UoWukBlmuUnftZXp_Xl5yNCX04xOFoUYS2LhNeSRZvHpbON8mNVgyDoeMomxXhzo0zWPVlTM3eP74nQsmAqHB4Ep4gp8sTnrEnxGgIJlTmPhXbSy1UHl5FmW9iEXZlJuSeayiL3m7oH/s1600/rstudio.png&quot; height=&quot;446&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/6502787788920301713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/6502787788920301713'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2014/02/instalando-r-y-rstudio-en-ubuntu-1204.html' title='Instalando R y RStudio en Ubuntu 12.04, 12.10, 13.04, 13.10'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl-qdkd0Qi7-Gf27Zj1JHmM0-3EIrZa2PGtVAICczTKIok9Hhw_i4m0sk_MMScqfcOiY4dqNit4vBuFfMBLEu0OFUCdeDZsBO4LajGRMJGL4A0h-nCFQSA7fJmP7zKf1zjwKpIm8flXnML/s72-c/r_lang_logo.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-5223097401869625779</id><published>2014-02-08T10:27:00.000-06:00</published><updated>2014-02-08T10:34:11.225-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PostgreSQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Programación"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips"/><title type='text'>Instalando y configurando PostgreSQL en un VPS con Ubuntu (Digital Ocean en mi caso)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHHUQQFAAikz32I3hyphenhyphenKSTIhNQs1U3uKK1Ts5NSk0LhCcFC1JVerOpYu-FK_3_LiBs0GPSMeC5l3f8XeVtQw2PwWu632NCDNQuLHl6be1NA1w7hJLQX67Is882_24IbhA7WRbpVaoNN1eWy/s1600/Postgresql.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHHUQQFAAikz32I3hyphenhyphenKSTIhNQs1U3uKK1Ts5NSk0LhCcFC1JVerOpYu-FK_3_LiBs0GPSMeC5l3f8XeVtQw2PwWu632NCDNQuLHl6be1NA1w7hJLQX67Is882_24IbhA7WRbpVaoNN1eWy/s1600/Postgresql.png&quot; height=&quot;117&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Antes que nada nos conectamos vía SSH a nuestro servidor, en caso que ya tengamos configurado el acceso SSH podemos saltarnos los siguientes pasos, sino a continuación comparto mi manera de proceder cuando configuro por primera vez SSH en un servidor remoto.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;
Configuración SSH en VPS&lt;/h3&gt;
ssh a root en la terminal con la IP de tu servidor
&lt;br /&gt;
&lt;pre&gt;ssh root@123.123.123.123&lt;/pre&gt;
Agregamos el fingerprint e ingresamos la contraseña provista por el proveedor para luego cambiarla a una de nuestra preferencia
&lt;pre&gt;passwd&lt;/pre&gt;
Creamos un nuevo usuario&lt;br /&gt;
&lt;pre&gt;adduser nombre-de-usuario &lt;/pre&gt;
Establecemos privilegios para el nuevo usuario&lt;br /&gt;
&lt;pre&gt;visudo&lt;/pre&gt;
Buscamos la sección de privilegios de usuarios
&lt;pre&gt;# User privilege specification
root  ALL=(ALL:ALL) ALL
&lt;/pre&gt;
Agregamos privilegios de super usuario al usuario recién creado, presiona Ctrl + X y guarda los cambios&lt;br /&gt;
&lt;pre&gt;nombre-de-usuario ALL=(ALL:ALL) ALL&lt;/pre&gt;
&lt;br /&gt;
Procedemos a configurar el acceso SSH
&lt;pre&gt;nano /etc/ssh/sshd_config&lt;/pre&gt;
Buscamos y cambiamos el puerto a uno que no sea el que está por defecto (el 22 está por defecto: por seguridad es mejor escoger uno entre el 1025..65536) y bloqueamos el acceso SSH desde la cuenta root
&lt;br /&gt;
&lt;pre&gt;Port 22 # cambialo a cualquiera que desees usar
Protocol 2
PermitRootLogin no
&lt;/pre&gt;
&lt;br /&gt;
Agrega al final del sshd_config el usuario que acabamos de crear, presiona Ctrl + X y guarda los cambios 
&lt;br /&gt;
&lt;pre&gt;AllowUsers nombre-de-usuario
&lt;/pre&gt;
&lt;br /&gt;
Recargamos SSH para aplicar los cambios
&lt;br /&gt;
&lt;pre&gt;reload ssh&lt;/pre&gt;
&lt;br /&gt;
Ahora desde una nueva consola y sin cerrar la actual procedemos a probar la conexión usando los datos que recién creamos.
&lt;br /&gt;
&lt;pre&gt;ssh -p numero-de-puerto-que-elegimos nombre-de-usuario@123.123.123.123&lt;/pre&gt;
&lt;br /&gt;
En caso que algo no funcione verifica si hiciste bien los pasos anteriores o deja un comentario con tus dudas.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Instalando y configurando Postgres&lt;/h3&gt;
Nos conectamos via SSH a nuestro servidor

&lt;pre&gt; ssh -p numero-de-puerto usuario@123.123.123.123 &lt;/pre&gt;

Antes de todo procedemos a actualizar los paquetes en el servidor remoto

&lt;pre&gt;sudo apt-get update&lt;/pre&gt;

Instalamos PostgreSQL 9.1

&lt;pre&gt;sudo apt-get install postgresql postgresql-server-dev-9.1&lt;/pre&gt;

Creamos un nuevo usuario en Postgres y le asignamos privilegios, adicional procedemos a crear una base de datos.

&lt;pre&gt;sudo -u postgres psql
create user nombre-de-usuario with password &#39;contraseña&#39;;
alter role nombre-de-usuario superuser createrole createdb replication;
create database nombre-de-bd owner nombre-de-usuario;
&lt;/pre&gt;
Listo, cada vez que queramos a acceder a una base de datos en particular simplemente ingresamos
&lt;pre&gt;psql nombre-de-bd&lt;/pre&gt;
&lt;br /&gt;
Si tienes alguna duda puedes preguntar en los comentarios :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/5223097401869625779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/5223097401869625779'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2014/02/instalando-y-configurando-postgresql-en.html' title='Instalando y configurando PostgreSQL en un VPS con Ubuntu (Digital Ocean en mi caso)'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHHUQQFAAikz32I3hyphenhyphenKSTIhNQs1U3uKK1Ts5NSk0LhCcFC1JVerOpYu-FK_3_LiBs0GPSMeC5l3f8XeVtQw2PwWu632NCDNQuLHl6be1NA1w7hJLQX67Is882_24IbhA7WRbpVaoNN1eWy/s72-c/Postgresql.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-5684840043594020611</id><published>2014-02-08T09:15:00.000-06:00</published><updated>2014-02-08T09:15:27.699-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Tips"/><title type='text'>Instalar ScreenCloud en Ubuntu 13.10 13.04 14.04</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh66bP_8KsB81_xAokcwuJt4o3Vhd2JLo_nnUNzMoLYSHxS4M87FuoSC4G5LWLdYw7JPyqTE7LGmr4-Tnq-FocEiE_NEuX0t8mrabr5txRMp2UDVFy2d31SnltImsOyFHibnxA9c_BeorGp/s1600/logo_screencloud.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh66bP_8KsB81_xAokcwuJt4o3Vhd2JLo_nnUNzMoLYSHxS4M87FuoSC4G5LWLdYw7JPyqTE7LGmr4-Tnq-FocEiE_NEuX0t8mrabr5txRMp2UDVFy2d31SnltImsOyFHibnxA9c_BeorGp/s1600/logo_screencloud.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a href=&quot;http://screencloud.net/&quot; target=&quot;_blank&quot;&gt;ScreenCloud&lt;/a&gt;&amp;nbsp;se ha convertido en mi herramienta favorita para tomar capturas de pantalla por su facilidad de uso y compartir. Hace poco actualice mi Ubuntu de la 12.04 a la 13.10, y al tratar de instalar nuevamente ScreenCloud habían ciertos errores con dependencias no encontradas usando el .deb del sitio oficial.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
A continuación dejo los pasos a seguir para lograr instalarlo:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;sudo su
echo &#39;deb http://download.opensuse.org/repositories/home:olav-st/xUbuntu_12.04/ /&#39; &amp;gt;&amp;gt; /etc/apt/sources.list.d/screencloud.list 
wget -O - http://download.opensuse.org/repositories/home:olav-st/xUbuntu_12.04/Release.key | apt-key add -
apt-get update
apt-get install screencloud
&lt;/pre&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/5684840043594020611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/5684840043594020611'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2014/02/instalar-screencloud-en-ubuntu-1310.html' title='Instalar ScreenCloud en Ubuntu 13.10 13.04 14.04'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh66bP_8KsB81_xAokcwuJt4o3Vhd2JLo_nnUNzMoLYSHxS4M87FuoSC4G5LWLdYw7JPyqTE7LGmr4-Tnq-FocEiE_NEuX0t8mrabr5txRMp2UDVFy2d31SnltImsOyFHibnxA9c_BeorGp/s72-c/logo_screencloud.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-7729579958278863179</id><published>2014-01-29T00:09:00.000-06:00</published><updated>2014-02-08T13:10:35.619-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Git"/><title type='text'>Workflow básico para GIT</title><content type='html'>A continuación comparto los comandos básicos para el trabajo día a día usando Git como sistema de control de versiones de código. Comandos que nos pueden de sacar de apuros muchas veces.

&lt;br /&gt;
&lt;pre&gt;#Antes de hacer cualquier cambio

git pull #sincroniza tus cambios con el repositorio remoto
 
git checkout -b nombre-de-la-nueva-rama #crea una nueva rama para cualquier nueva corrección de bug/característica/asunto
 
 
#Luego agrega cambios a tu trabajo
#mantenlos en trozos pequeños, entre más pequeños sus commits es mejor, por si las cosas salen mal
 
git add . #agrega cualquier nuevo archivo que hayas creado
 
git status (y/o) git diff #miras los cambios con los que realizarás tu commit
 
git commit -m “Mensaje detallado acá”  #haz tu commit con un buen mensaje detallado
 
git checkout master  #cambia nuevamente a la rama master cuando la nueva caracteristica esté lista, revisa si tus pruebas pasan antes de hacerlo, todo ejecuta bien?
 
git merge nombre-de-la-rama #actualiza la rama master para sincronizar tus últimos cambios
 
git push #envía tis cambios al repositorio remoto

&lt;/pre&gt;
Listo...&lt;br /&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/7729579958278863179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/7729579958278863179'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2014/01/workflow-basico-para-git.html' title='Workflow básico para GIT'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-6182953349945220173</id><published>2014-01-28T23:10:00.002-06:00</published><updated>2014-02-08T20:21:01.321-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Comparar cadenas en Java: == o .equals()</title><content type='html'>Para comparar dos cadenas en Java debes saber lo siguiente. Al usar&lt;i&gt; ==&lt;/i&gt; pruebas si dos objetos tienen la misma referencia. Y al usar &lt;i&gt;.equals()&lt;/i&gt; pruebas si los valores de las cadenas son iguales.

Por ejemplo:&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;
&lt;pre&gt;String ejString1 = new String(&quot;ejemplo&quot;);
String ejString2 = new String(&quot;ejemplo&quot;);

// Retornará falso
ejString1 == ejString2;

// Retornará verdadero
ejString1.equals(ejString2);

// Retornará verdadero, porque Java usa el mismo objeto.

&quot;ejemplo&quot; == &quot;ejemplo&quot;;
&lt;/pre&gt;
Pero ten cuidado al comparar cadenas con valores null. En tal caso, el == manejará adecuadamente las cadenas con valores &lt;i&gt;null&lt;/i&gt;, peroo llamando al método &lt;i&gt;.equals()&lt;/i&gt; desde una cadena null causará una excepción. 

&lt;pre&gt;String nullString1 = null;
String nullString2 = null;

//Retorna verdadero
nullString1 = nullString2;

//Lanza una exepción
nullString1.equals(nullString2);
&lt;/pre&gt;
Cuando se trabaja con cadenas concatenadas y se compara en tiempo de compilación, la comparación resulta en los mismos objetos.

&lt;pre&gt;// retorna true
&quot;prueba&quot; == &quot;pru&quot; +&quot;eba&quot;;
&lt;/pre&gt;
Sin embargo si se invoca a un método como &lt;i&gt;.substring()&lt;/i&gt; en tiempo de ejecución se generan objetos distintos:

&lt;pre&gt;//retornará false
&quot;prueba&quot; == &quot;!prueba&quot;.substring(1)
&lt;/pre&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/6182953349945220173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/6182953349945220173'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2014/01/comparar-cadenas-en-java-o-equals.html' title='Comparar cadenas en Java: == o .equals()'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-4514307800323174156</id><published>2013-09-07T09:57:00.002-05:00</published><updated>2013-09-07T10:55:38.114-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Programación"/><title type='text'>Entendiendo la Orientación a Objetos en Javascript</title><content type='html'>&lt;img alt=&quot;Javascript Objects&quot; height=&quot;187&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_GqU1Zs5B1B3JwDC412X1VwDYw5KIpaQore3PjPoZJvXmQlsrJ3Vkh0QKIUMyuLp4F5152WUOgW-esP5SheaGehatYXZTgdYrsjSUXAMwd8L54KA18D6S0kmkF1eUsUz50zMusEoWd-WE/&quot; style=&quot;display: block; margin-left: auto; margin-right: auto; vertical-align: middle;&quot; width=&quot;250&quot; /&gt;&lt;br /&gt;
Si eres desarrollador web, con seguridad usas javascript con frecuencia. Es probable que ya sepas como crear y usar objetos, pero no te sientes cómodo al hacerlo, después de todo Javascript no se asemeja mucho a algunos de los lenguajes &quot;puramente&quot; orientados a objetos. Pero, con un poco de ayuda es posible que puedas comprender lo que realmente significa orientación a objetos en Javascript.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;
¿Qué es un objeto en Javascript&lt;/h2&gt;
En términos de Javascript, un objeto es una colección de pares key-value (llave / valor), dónde la llave (key) debe ser una cadena. El valor no tiene ningún tipo de restricciones, por tanto puede almacenar primitivas, objetos y funciones (en ese contexto se les llama &quot;mètodos&quot;). Las variables y los campos del objeto solo referencia al objeto. Los objetos pueden ser comparados solo en terminos de identidad referencial.&lt;br /&gt;
&lt;h2&gt;
¿Cómo crear un objeto en Javascript?&lt;/h2&gt;
Hay muchas maneras de crear un objeto en Javascript, dejame nombrar algunas de éstas.&lt;br /&gt;
&lt;h3&gt;
Objeto Literal&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;var perro = {
  name: &quot;Oso&quot;,
  ladrar: function() {
  console.log(&quot;wau, wau&quot;)
  }
}&lt;/code&gt;&lt;/pre&gt;
Lo cual crea explicitamente el objeto perro con el campo &lt;code&gt;nombre&lt;/code&gt; y el método ladrar. El concepto básico aquí es que muchas veces en tu aplicación hay necesidad de tener muchos objetos con la misma estructura y comportamiento. La orientación a objetos se revela en las instancias, no en las clases.&lt;br /&gt;
&lt;h3&gt;
Método Object Create&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;var gato = Object.create
  gato.nombre = &quot;Misifú&quot;
  gato.miau = function() {
  console.log(&quot;miau miau&quot;)
}&lt;/code&gt;&lt;/pre&gt;
&lt;code&gt;Object.create&lt;/code&gt; instancia un objeto gato vacío -sin ningún campo, convirtiéndose en un prototipo del objeto creado. Más adelante abordaremos los prototipos, mientras enfoquémonos en el objeto gato. Agregamos algunos atributos y comportamiento por medio de la asignación de valores y funciones a sus campos inicialmente no existentes. Por supuesto en tiempo real puedes cambiar ambos campos con nuevos valores (o funciones) e incluso remover algún campo.&lt;br /&gt;
&lt;h2&gt;
Función constructor&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;function Leon(nombre) {
this.nombre = nombre;
this.rugir = function() {
console.log(&quot; arrr arrr&quot;)
}
}
var leon = new Leon(&quot;Tonio&quot;)&lt;/code&gt;&lt;/pre&gt;
Primero que todo qué es Leon? Como puedes ver es una función, pero un tipo especial, es llamado constructor, ya que construye nuevos objetos con determinados atributos y comportamiento. Ojo, en este ejemplo cada objeto construido con Leon tendrá un método rugir distinto. Más adelante veremos como compartir métodos.&lt;br /&gt;
Esta es la primera manera de diferenciar las clases de los objetos - si creaste un objeto con un constructor puedes decir, que el objeto es su instancia-.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;leon instaceof Leon //= true&lt;/code&gt;&lt;/pre&gt;
Pero recuerda - leon no es una instancia de la clase Leon, sino que leon es una instanciada por el constructor Leon.&lt;br /&gt;
&lt;h2&gt;
Herencia por prototipos&lt;/h2&gt;
En javascript la herencia se basa en objetos, así que un objeto &quot;a&quot; puede heredar atributos y comportamiento de un objeto &quot;b&quot;, entonces el objeto &quot;b&quot; es llamado prototipo del objeto &quot;a&quot;. Por supuesto &quot;b&quot; puede también puede tener prototipo, entonces cada objeto tiene una cadena de prototipos. Veamos un ejemplo:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;var protoGato = {
nombre: &quot;Misifu&quot;,
miagar: function() {
return this.nombre + &quot;: miau miau&quot;
}
}
// 1
var gato = Object.create(protoGato)
console.log(gato.nombre) // Misifu
console.log(gato.miagar()) // Misifu: miau miau

//2
protoGato.nombre = &quot;Proto&quot;
console.log(gato.nombre) // Proto
console.log(gato.miagar()) // Proto: miau miau

// 3
gato.nombre = &quot;Nyan Cat&quot;
console.log(gato.nombre) // Nyan Cat
console.log(protoGato.nombre) // Proto
console.log(gato.miagar()) // Nyan Cat: miau miau

//4
gato.miagar = function() {
return this.nombre + &quot;: rrruf rrruf&quot;
}
console.log(gato.miagar()) // Nyan Cat: rrruf rrruf
console.log(protoCat.miagar()) //Proto: miau miau&lt;/code&gt;&lt;/pre&gt;
Como puedes ver en este ejemplo los campos de protoGato son reservados, si gato no tiene manera de interpretar un campo lo busca en el prototipo, y luego de forma recursiva en el prototipo del prototipo... Si ese campo es una función se pasa también el objeto correcto - en el cual el método es invocado - como tal. Y si el método encontrado usa un campo de un objeto el interprete comienza buscando desde el objeto original.&lt;br /&gt;
Por tanto un prototipo define por defecto los atributos y comportamiento de los objetos que heredan de éste y esa es la manera de compartir y rehusar comportamientos comunes. La gran diferencia acá es que no heredas de claces instanciadas, sino que solo instancias, de manera que si cambias un atributo de un prototipo en tiempo real, todos los objetos que heredan de éste serán afectados a menos que estos sobrescriban el atributo.&lt;br /&gt;
&lt;h2&gt;
Prototipo común para objectos construidos&lt;/h2&gt;
Hemos visto como crear objetos con prototipo con Objetc.create. También puedes asignar un prototipo común para objetos creados por constructor:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;vas animal = {
ladrar: function() {
return this.nombre + &quot;: wau wau&quot;
}
}

function Lobo(nombre) {
this.nombre = nombre
}

Lobo.prototype = animal

var lobo = new Lobo(&quot;Tyson&quot;)
console.log(lobo.ladrar()) // Tyson: wau wau&lt;/code&gt;&lt;/pre&gt;
&lt;code&gt;Lobo.prototype = animal&lt;/code&gt; significa que quieres que cada objeto construido tenga un animal como prototipo. Por supuesto que el prototipo puede ser también creado con un constructor.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;function Animal() {
//...
}

function Lobo() {
//...
}

Lobo.prototype = new Animal()
var lobo = new Lobo()&lt;/code&gt;&lt;/pre&gt;
En este caso el objeto lobo is tanto instancia de Lobo como de Animal en terminos del operador &lt;code&gt;instanceof&lt;/code&gt;. ¿Por qué lobo &lt;code&gt;lobo intanceof Animal&lt;/code&gt; es verdadero? Supongamos que eliminamos todos los atributos correspondientes a Lobo, como se va a comportar lobo? como Animal, por supuesto, entonces esa es la respuesta.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/4514307800323174156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/4514307800323174156'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2013/09/entendiendo-la-orientacion-objetos-en.html' title='Entendiendo la Orientación a Objetos en Javascript'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_GqU1Zs5B1B3JwDC412X1VwDYw5KIpaQore3PjPoZJvXmQlsrJ3Vkh0QKIUMyuLp4F5152WUOgW-esP5SheaGehatYXZTgdYrsjSUXAMwd8L54KA18D6S0kmkF1eUsUz50zMusEoWd-WE/s72-c" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-3991712105354068485</id><published>2013-09-05T16:28:00.000-05:00</published><updated>2013-09-05T16:38:51.152-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="Programación"/><title type='text'>Laravel, un framework PHP comprometido con la elegancia y sencillez </title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmKwgnaW5QvSWba5X_rEM0qi-09s8erR4s57RcB46Aoi08aoDKUhRY8VAnOson9Bmmz74lgJkzOgvj7y7lMksGWkfru2WawgV-jZhy_SGQxiSNw_lmdEhO6nhcvCRBF5-Am3ggiVNDRupM/s1600/laravel_logo1.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmKwgnaW5QvSWba5X_rEM0qi-09s8erR4s57RcB46Aoi08aoDKUhRY8VAnOson9Bmmz74lgJkzOgvj7y7lMksGWkfru2WawgV-jZhy_SGQxiSNw_lmdEhO6nhcvCRBF5-Am3ggiVNDRupM/s320/laravel_logo1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Normalmente en la red no leo cosas buenas de PHP, a pesar de ser el lenguaje de programación backend más popular en Internet. De mi parte, aunque me siento más inclinado a trabajar con Ruby y Ruby on Rails, debo reconocer que no he tenido malas experiencias trabajando con PHP, aunque desde luego no he elaborado proyectos de gran envergadura, sin embargo gracias a Wordpress y Drupal que uso a menudo para proyectos, tengo buenas impresiones de PHP.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
Sin embargo y aterrizando a desarrollos más serios de aplicaciones, me he encontrado con un framework muy bueno llamado Laravel. No voy a entrar en controversia acerca de si Laravel es mejor que X framework de PHP, porque no he tenido experiencias previas con otros, pero éste me ha llamado mucho la atención y sin duda sería mi primera elección en caso de realizar algún proyecto en PHP.&lt;br /&gt;
&lt;br /&gt;
Laravel es un framework PHP comprometido con elegancia y sencillez. El desarrollo no tiene que ser doloroso, sobre todo en PHP. De hecho, puede ser agradable usando las herramientas adecuadas. Laravel es para todos los programadores de PHP, incluso principiantes.&lt;br /&gt;
&lt;br /&gt;
Por cierto, la documentación de Laravel la hace una gran opción tanto para programadores principiantes como avanzados.

Además de la documentación, la comunidad de Laravel siempre está dispuesto a ayudar y a responder preguntas que no están cubiertas en la documentación. Los Bundles son una gran manera de empaquetar y compartir código en Laravel. Pueden ser cualquier cosa - desde un ORM completo, hasta herramientas de depuración simples, y es muy fácil de usar en las aplicaciones que creamos!
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.laravel.com/&quot; target=&quot;_blank&quot;&gt;Laravel&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi30jP2__N_7G6_qK2VLyD6Yr2TACFjUnlug-9YKyoefw7ejPIAPd39L-tAjAVFCw1yfc3vSNTREMeZD230sPxor26IiSZl5-9NN91eE75PmuvAndzZZyqpsjfrOHoIU8Mh26lnDJk7cFka/s1600/Welcome++++Laravel+PHP+Framework.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;307&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi30jP2__N_7G6_qK2VLyD6Yr2TACFjUnlug-9YKyoefw7ejPIAPd39L-tAjAVFCw1yfc3vSNTREMeZD230sPxor26IiSZl5-9NN91eE75PmuvAndzZZyqpsjfrOHoIU8Mh26lnDJk7cFka/s640/Welcome++++Laravel+PHP+Framework.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/3991712105354068485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/3991712105354068485'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2013/09/laravel-un-framework-php-comprometido.html' title='Laravel, un framework PHP comprometido con la elegancia y sencillez '/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmKwgnaW5QvSWba5X_rEM0qi-09s8erR4s57RcB46Aoi08aoDKUhRY8VAnOson9Bmmz74lgJkzOgvj7y7lMksGWkfru2WawgV-jZhy_SGQxiSNw_lmdEhO6nhcvCRBF5-Am3ggiVNDRupM/s72-c/laravel_logo1.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-3624828931107030860</id><published>2013-09-04T18:52:00.001-05:00</published><updated>2013-09-04T19:55:17.204-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><title type='text'>Instalando Node.js y npm en Ubuntu 12.04 y 13.04</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioZOuf2pK2rZvc7OTEp9QhG3CUiKZHD7APt7MoDPmr-_fOvxO97u0jHQTD5cNGeQkxGX8_2MVpOqLZzsc9XH08TUf7BL3KunqyA9sujyAABoebqyhOrmiQaz0npDJXgtGKRLfoGmI4WS6S/s1600/nodejs_npm.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioZOuf2pK2rZvc7OTEp9QhG3CUiKZHD7APt7MoDPmr-_fOvxO97u0jHQTD5cNGeQkxGX8_2MVpOqLZzsc9XH08TUf7BL3KunqyA9sujyAABoebqyhOrmiQaz0npDJXgtGKRLfoGmI4WS6S/s1600/nodejs_npm.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Hoy en día se ha popularizado el framework node.js, que lleva al lenguaje JavaScript, tradicionalmente usado para desarrollo del lado del cliente -front end- a otro nivel, permitiendo ahora trabajar del lado del servidor -backend- y desarrollar sistemas en tiempo real. En esta ocasión quiero explicar como se instala node.js junto con &quot;node packaged modules&quot; npm (que nos servirá para instalar paquetes de librerias, de los cuales hay disponibles miles y la cantidad aumenta rápidamente) en Ubuntu 12.04 y Ubuntu 13.04.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;
Instalación de node.js y npm en Ubuntu 12.04 LTS&lt;/h2&gt;
Asumiendo que tienes una instalación fresca de Ubuntu 12.04 LTS&lt;br /&gt;
&lt;br /&gt;
1. Configuramos el sistema para manejar la compilación y la instalación desde el código fuente.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;$ sudo apt-get install build-essential&lt;/code&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
2. Si es necesario soporte a SSL entonces necesitas instalar &lt;code&gt;libssl-dev&lt;/code&gt;

&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;$ sudo apt-get install libssl-dev&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
3. Para instalar el script que usaremos vamos a necesitar instalar &lt;code&gt;curl.&lt;/code&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;$ sudo apt-get install curl&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
4. Descargamos el script &quot;&lt;a href=&quot;https://gist.github.com/dwayne/2983873/raw/174305c76396c014b785729e941483cd6b558f0e/node-and-npm-in-30s.sh&quot;&gt;node-and-npm-in-30-seconds.sh&lt;/a&gt;&quot; que realizará la descarga, compilación e instalación, o bien podemos copiar el script a continuación:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;# The install script
# Adapted from https://gist.github.com/579814
 
echo &#39;# Added by install script for node.js and npm in 30s&#39; &amp;gt;&amp;gt; ~/.bashrc
echo &#39;export PATH=$HOME/local/bin:$PATH&#39; &amp;gt;&amp;gt; ~/.bashrc
echo &#39;export NODE_PATH=$HOME/local/lib/node_modules&#39; &amp;gt;&amp;gt; ~/.bashrc
. ~/.bashrc
 
mkdir -p ~/local
mkdir -p ~/Downloads/node-latest-install
 
cd ~/Downloads/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
 
./configure --prefix=~/local # if SSL support is not required, use --without-ssl
make install # ok, fine, this step probably takes more than 30 seconds...&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
A continuación ejecutamos el script &lt;code&gt;./nombredelscrip &lt;/code&gt; (si es necesario, recuerden darle privilegios &lt;code&gt;sudo&lt;/code&gt;. Este paso toma un buen rato, dependiendo de tu compu y recursos.
&lt;br /&gt;
Finalmente puedes verificar la versión instalada de node y npm, con los siguientes comandos:
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;$ node -v
$ npm -v&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;
Instalación de node.js y npm en Ubuntu 13.04&lt;/h2&gt;
1. Ingresa a la página de &lt;a href=&quot;http://nodejs.org/download/&quot; target=&quot;_blank&quot;&gt;descarga de Node.js&lt;/a&gt; y busca la columna &lt;strong&gt; Linux Binaries (.tar.gz),&lt;/strong&gt; y descarga la versión más reciente para arquitecturas de 32 o 64 bits.&lt;br /&gt;
&lt;br /&gt;
2. Digamos que haz descargado el paquete &lt;code&gt;node-v0.10.18-linux-x64.tar.gz&lt;/code&gt; dentro de la carpeta &lt;code&gt;Descargas&lt;/code&gt;. Luego abre la terminal e ingresa lo siguiente.
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
$ cd ~/Descargas
$ mkdir -p ~/local/node
$ tar xzf node-v0.10.7-linux-x64.tar.gz -C ~/local/node --strip-components=1
$ echo &#39;export PATH=$HOME/local/node/bin:$PATH&#39; &amp;gt;&amp;gt; ~/.bashrc
$ echo &#39;export NODE_PATH=$HOME/local/node/lib/node_modules&#39; &amp;gt;&amp;gt; ~/.bashrc
$ . ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
3. No hay paso 3. Eso es todo</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/3624828931107030860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/3624828931107030860'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2013/09/instalando-nodejs-y-npm-en-ubuntu-1204.html' title='Instalando Node.js y npm en Ubuntu 12.04 y 13.04'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioZOuf2pK2rZvc7OTEp9QhG3CUiKZHD7APt7MoDPmr-_fOvxO97u0jHQTD5cNGeQkxGX8_2MVpOqLZzsc9XH08TUf7BL3KunqyA9sujyAABoebqyhOrmiQaz0npDJXgtGKRLfoGmI4WS6S/s72-c/nodejs_npm.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-1377945979633817658</id><published>2013-09-04T17:26:00.002-05:00</published><updated>2013-09-04T17:50:37.295-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips"/><title type='text'>Cleaver, crea una presentación usando Markdown</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRWrE3BbHpFDx7CblHVNXQGS9y_-qWUsbgzU0YoIz2TOPVEWETvc1DNcCrYOt5BfjDIXw0ucr2y4UDiVPEb6U7SCQWfo0Y6SK924LkOKpsYlTDEBqygYUahyphenhyphenalOPYnkM0bJ3IF4x6oCIy9/s1600/Cleaver-making-slideshow-using-Markdown.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRWrE3BbHpFDx7CblHVNXQGS9y_-qWUsbgzU0YoIz2TOPVEWETvc1DNcCrYOt5BfjDIXw0ucr2y4UDiVPEb6U7SCQWfo0Y6SK924LkOKpsYlTDEBqygYUahyphenhyphenalOPYnkM0bJ3IF4x6oCIy9/s320/Cleaver-making-slideshow-using-Markdown.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Markdown pasó del anonimato a ser uno de los lenguajes de marcado más utilizados, usado para documentar código, escribir artículos... y ahora incluso para crear presentaciones minimalistas de manera simple y rápida. Cleaver permite la creación de presentaciones HTML en tiempo record, con un buen aspecto sin escribir una sola linea de código o preocuparse por reposicionar elementos en una presentación tradicional.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;h2&gt;
Cómo comenzar&lt;/h2&gt;
&lt;div&gt;
Primero debemos crear un archivo Markdown en el cual escribiremos el contenido de la presentación.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;code&gt;
# Instalando Cleaver&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;$ npm install -g cleaver&amp;nbsp;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;# Crea un demo.md&amp;nbsp;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;$ vi demo.md&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Cleaver tiene una plantilla con metadatos por defecto para definir nuestra presentación.&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
title: Basic Example&amp;nbsp;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;author:
    name: &quot;Jordan Scales&quot;&amp;nbsp;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&amp;nbsp;twitter: &quot;@jdan&quot;&amp;nbsp;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&amp;nbsp;url: &quot;http://jordanscales.com&quot;&amp;nbsp;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&amp;nbsp;style: my_style.css&amp;nbsp;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;output: basic.html&amp;nbsp;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;controls: true
&lt;/code&gt;
&lt;br /&gt;
&lt;h2&gt;
Ahora vamos a crear una pequeña presentación.&lt;/h2&gt;
Vamos a necesitar crear un archivo Markdown para nuestro contenido, en mi caso &lt;code&gt;demo.md&lt;/code&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;title: Bienvenido a mi blog!&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;author:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; name: &quot;Gerardo Ortega&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; twitter: &quot;@g3ortega&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; url: &quot;http://g3ortega.com&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;output: demo.html&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;controls: true&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;# Mi blog&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;## Este es un sitio donde escribo de:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;* desarrollo web&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;* tips&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;* javascript y ruby :)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;# A qué me dedico?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;* soy desarrollador web&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;* ruby on rails&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;y mucho más&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;--&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;# Gracias&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;## Encuentrame en Twitter: @g3ortega!&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Y el &#39;ultimo paso es simplemente compilarlo:

&lt;code&gt;cleaver demo.md&lt;/code&gt;

ésto generará un archivo &lt;code&gt;demo.html&lt;/code&gt; conforme a lo que hemos establecido. Ahora solo resta abrirlo en el navegador.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic76S9WOW8EfKC32izJecLsC1-5ExPLqr-k5aA39FXEpSzxX_wPaitGh1Eq2_BQszmxf4zlz4F23DK5hlAXRO6me5RZwEoRrYrbN2DVDn-yxNhsrjZ-vtI8WSDVLXsxx8UOAjTJBpO8PTy/s1600/cleaver_node.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic76S9WOW8EfKC32izJecLsC1-5ExPLqr-k5aA39FXEpSzxX_wPaitGh1Eq2_BQszmxf4zlz4F23DK5hlAXRO6me5RZwEoRrYrbN2DVDn-yxNhsrjZ-vtI8WSDVLXsxx8UOAjTJBpO8PTy/s400/cleaver_node.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/1377945979633817658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/1377945979633817658'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2013/09/clever-crea-una-presentacion-usando.html' title='Cleaver, crea una presentación usando Markdown'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRWrE3BbHpFDx7CblHVNXQGS9y_-qWUsbgzU0YoIz2TOPVEWETvc1DNcCrYOt5BfjDIXw0ucr2y4UDiVPEb6U7SCQWfo0Y6SK924LkOKpsYlTDEBqygYUahyphenhyphenalOPYnkM0bJ3IF4x6oCIy9/s72-c/Cleaver-making-slideshow-using-Markdown.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-4801157129702806911</id><published>2013-08-31T14:09:00.000-05:00</published><updated>2013-09-04T13:15:59.997-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby on Rails"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips"/><title type='text'>Usando PostgreSQL con Ruby on Rails</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgE5nNiAHqQ-q3CylRbK4HmjSddTvHFI_44r1AARWoCbUlvJGP1bQoPSt_zyaq-YPx1JzuGxLj2xxPKAiVjk-gfO4kkDcweImfpwICq2X-hwdRBAW0p0G-X59gT04rJ3851VQEojUesJbWs/s1600/postgresql_logo-555px.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgE5nNiAHqQ-q3CylRbK4HmjSddTvHFI_44r1AARWoCbUlvJGP1bQoPSt_zyaq-YPx1JzuGxLj2xxPKAiVjk-gfO4kkDcweImfpwICq2X-hwdRBAW0p0G-X59gT04rJ3851VQEojUesJbWs/s200/postgresql_logo-555px.png&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Hace no mucho publicaba un post sobre como &lt;a href=&quot;http://blog.g3ortega.com/2013/05/instalando-y-configurando-postgresql-en.html&quot; target=&quot;_blank&quot;&gt;instalar y configurar PostgreSQL para trabajar con Ruby on Rails&lt;/a&gt;, ahora quiero repasar algunos pasos de la instalación, adicional después daré algunos comandos y tips útiles para el proceso de desarrollo en Rails.&lt;br /&gt;
&lt;h2&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Instalación de PostgreSQL en Ubuntu 13.04 y Ubuntu 13.10&lt;/h2&gt;
La instalación sobre Ubuntu es bastante sencilla, de momento estoy corriendo Ubuntu 13.04 y la instalación de la versión 9.1 se realiza con el comando &lt;code&gt;sudo apt-get install postgresql&lt;/code&gt;, adicional solo requirimos instalar una libreria para desarrollo &lt;code&gt;sudo apt-get install libpq-dev&lt;/code&gt;

Ahora solo necesitamos agregar un nuestro usuario de sistema desde la linea de comandos:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;$ sudo su postgres -c psql
postgres&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;postgres=# CREATE ROLE nombredeusuario SUPERUSER LOGIN;&amp;nbsp;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;postgres=# \q&lt;/code&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;
Podemos verificar la instalación con el comando &lt;code&gt;psql --version&lt;/code&gt;.

&lt;br /&gt;
&lt;h2&gt;
Postgres y Ruby on Rails&lt;/h2&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Si queremos crear una nueva aplicación en Ruby on Rails con Postgresql preconfigurado, es sencillo con el comando -d que provee rails, el cual nos permite pasar como parámetro diferentes servidores de bases de datos, entre éstos PostgreSQL.&lt;/li&gt;
&lt;br /&gt;
&lt;code&gt;$ rails new prueba -d postgresql&lt;/code&gt;&amp;nbsp;&lt;/ul&gt;
&lt;ul&gt;Automaticamente rails generará una aplicación, y podemos notar que la gema pg esta en el Gemfile, sustituyendo a la gema sqlite3 que es incluida por default.&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&amp;nbsp;Una vez creada nuestra aplicación en rails debemos configurar los parámetros de acceso a postgre, esto lo hacemos en el archivo /config/database.yml principalmente el nombre de usuario y la contraseña en caso que lo hayamos establecido de esa manera.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;Luego usamos el siguiente comando de rails para crear las bases de datos que establece por defecto para los entornos de desarrollo, producción y pruebas. Si no deseamos los nombres por defecto (p.e. prueba_development, prueba_production) podemos cambiarlos en el archivo database.yml antes de realizar este paso.&amp;nbsp;&lt;/li&gt;
&lt;br /&gt;
&lt;code&gt;$ rake db:create:all&amp;nbsp;&lt;/code&gt;&lt;/ul&gt;
&lt;ul&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;li&gt;Si el paso anterior no nos da ningún error, significa que se han creado correctamente las bases de datos, por ahora siguiendo con nuestro ejemplo podemos crear un CRUD simple, para comprobar el ingreso de datos y hacer uso de nuestras bases de datos recién creadas.
&lt;br /&gt;&lt;br /&gt;
&lt;code&gt;$ rails g scaffold aplicacion nombre descripcion:text&lt;/code&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;Proseguimos a crear la tabla para almacenar nuestras aplicaciones:
&lt;br /&gt;&lt;br /&gt;
&lt;code&gt;$ rails db:migrate&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Podemos comprobar que nuestra tabla ha sido creada usando el comando psql más el nombre de nuestra base de datos o bien usando el comando &lt;b&gt;rails db&lt;/b&gt; que nos dirigirá al cliente en consola de postgres.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;b&gt;Algunos comandos de postgresql útiles:&lt;/b&gt;&lt;br /&gt;
\d = nos muestra la lista de relaciones en nuestra base de datos&lt;br /&gt;
\d nombredetabla = nos muestra el diseño de la tabla dada&lt;br /&gt;
\? = para una completa lista de comandos&lt;br /&gt;
\h = para lista de comandos sql&lt;br /&gt;
\h nombredecomando = nos da información sobre un determinado comando sql&lt;br /&gt;
\q = para salir del cliente psql&lt;/blockquote&gt;
Si quieres aprender mas de PostgreSQL y SQL puedes leer la documentación en el sitio que esta muy buena&amp;nbsp;&lt;a href=&quot;http://www.postgresql.org/docs/9.1/interactive/index.html&quot;&gt;http://www.postgresql.org/docs/9.1/interactive/index.html&lt;/a&gt;, o bien dirigirte a una serie de videotutoriales en español&amp;nbsp;de Jesús Conde&amp;nbsp;&lt;a href=&quot;http://www.youtube.com/playlist?list=PLAF4831DDBDB8E841&quot;&gt;http://www.youtube.com/playlist?list=PLAF4831DDBDB8E841&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Próximamente estaré subiendo un post sobre como migrar datos de otros servidores de bd hacía PostgreSQL.&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/4801157129702806911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/4801157129702806911'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2013/08/usando-postgresql-con-ruby-on-rails.html' title='Usando PostgreSQL con Ruby on Rails'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgE5nNiAHqQ-q3CylRbK4HmjSddTvHFI_44r1AARWoCbUlvJGP1bQoPSt_zyaq-YPx1JzuGxLj2xxPKAiVjk-gfO4kkDcweImfpwICq2X-hwdRBAW0p0G-X59gT04rJ3851VQEojUesJbWs/s72-c/postgresql_logo-555px.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-2974011471079692509</id><published>2013-06-09T12:49:00.002-05:00</published><updated>2013-09-05T12:14:02.447-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programación"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips"/><title type='text'>Tutorial básico sobre Markdown [GUIA]</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVsMsrHj4Zrd4dfHA3B9XKA4EbwXYzOtmOsqbkWWeC5P3om2WBSigF2GiOlAIY9ggHuVpQ-ct-Ia0wCnOHyyjCPq6J6XjRcZZ1xiBPPPC8V2RYsCsDJldeIc9TQmAuGg86zccyF4mGnYb1/s1600/logo_markdown.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;212&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVsMsrHj4Zrd4dfHA3B9XKA4EbwXYzOtmOsqbkWWeC5P3om2WBSigF2GiOlAIY9ggHuVpQ-ct-Ia0wCnOHyyjCPq6J6XjRcZZ1xiBPPPC8V2RYsCsDJldeIc9TQmAuGg86zccyF4mGnYb1/s320/logo_markdown.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
¿Qué es Markdown y para qué sirve?&lt;/h3&gt;
Markdown es un lenguaje de marcado ligero, que nos permite escribir contenido en texto plano que luego puede ser traducido en formato HTML válido, y con la ayuda de alguna herramienta puedes visualizar instantáneamente el resultado. Actualmente se ha popularizado porque viene por defecto en algunos servicios de control de versiones como Github o Bitbucket, para escribir READMEs, wikis, etc... e incluso en algunos CMS sencillos, o bien generadores de sitios dinámicos como &lt;a href=&quot;https://github.com/mojombo/jekyll&quot; target=&quot;_blank&quot;&gt;Jekyll&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;
Parrafos&lt;/h3&gt;
&lt;pre&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.   
 
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;b&gt;será igual a

&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&amp;lt;p&amp;gt;Lorem&amp;nbsp;ipsum&amp;nbsp;dolor&amp;nbsp;sit&amp;nbsp;amet,&amp;nbsp;consectetur&amp;nbsp;adipisicing&amp;nbsp;elit,&amp;nbsp;sed&amp;nbsp;do&amp;nbsp;eiusmod&amp;nbsp;tempor&amp;nbsp;incididunt&amp;nbsp;ut&amp;nbsp;labore&amp;nbsp;et&amp;nbsp;dolore&amp;nbsp;magna&amp;nbsp;aliqua.&amp;lt;/p&amp;gt;
&amp;nbsp;
&amp;lt;p&amp;gt;Ut&amp;nbsp;enim&amp;nbsp;ad&amp;nbsp;minim&amp;nbsp;veniam,&amp;nbsp;quis&amp;nbsp;nostrud&amp;nbsp;exercitation&amp;nbsp;ullamco&amp;nbsp;laboris&amp;nbsp;nisi&amp;nbsp;ut&amp;nbsp;aliquip&amp;nbsp;ex&amp;nbsp;ea&amp;nbsp;commodo&amp;nbsp;consequat.&amp;lt;/p&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;h3&gt;
Negritas y cursivas&amp;nbsp;&lt;/h3&gt;
&lt;pre class=&quot;html&quot; style=&quot;font-family: monospace;&quot;&gt;*Lorem ipsum*      =&amp;gt; &amp;lt;em&amp;gt;Lorem ipsum&amp;lt;/em&amp;gt;
**Lorem ipsum**    =&amp;gt; &amp;lt;strong&amp;gt;Lorem ipsum&amp;lt;/strong&amp;gt;&lt;/pre&gt;
&lt;h3&gt;
Encabezados&lt;/h3&gt;
&lt;pre class=&quot;html&quot; style=&quot;font-family: monospace;&quot;&gt;#Heading 1 (h1)  
##Heading 2 (h2)  
###Heading 3 (h3)  
####Heading 4 (h4) 
#####Heading 5 (h5) 
######Heading 6 (h6)
&lt;/pre&gt;
&lt;pre class=&quot;html&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;/pre&gt;
&lt;h3&gt;
Listas desordenadas&lt;/h3&gt;
&lt;pre class=&quot;html&quot; style=&quot;font-family: monospace;&quot;&gt;* esta es una lista  
* esta es una lista  
* esta es una lista  
&amp;nbsp;
- esta es una lista  
- esta es una lista  
- esta es una lista&lt;/pre&gt;
&lt;h3&gt;
Lineas&lt;/h3&gt;
&lt;pre class=&quot;html&quot; style=&quot;font-family: monospace;&quot;&gt;-------------------------------- 
or
================================&lt;/pre&gt;
&lt;h3&gt;
Blockquotes&lt;/h3&gt;
&lt;pre class=&quot;html&quot; style=&quot;font-family: monospace;&quot;&gt;&amp;amp;gt; Duis aute irure dolor in reprehenderit in voluptate velit esse  
&amp;amp;gt; cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non  
&amp;amp;gt; proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/pre&gt;
&lt;h3&gt;
Links&lt;/h3&gt;
&lt;pre class=&quot;html&quot; style=&quot;font-family: monospace;&quot;&gt;[Blog](http://blog.g3ortega.com)&lt;/pre&gt;
&lt;h3&gt;
Imágenes&lt;/h3&gt;
&lt;pre class=&quot;html&quot; style=&quot;font-family: monospace;&quot;&gt;![image](http://imagenurl.jpg)  
![image](http://imagenurl.jpg &quot;Titulo de la Imagen&quot;)  # con etiqueta alt &lt;/pre&gt;
&lt;h3&gt;
Mas información...&lt;/h3&gt;
&lt;a href=&quot;http://daringfireball.net/projects/markdown/syntax&quot;&gt;http://daringfireball.net/projects/markdown/syntax&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://whatismarkdown.com/&quot;&gt;http://whatismarkdown.com/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Editores Markdown?&lt;/h3&gt;
&lt;div&gt;
&lt;div&gt;
&lt;b&gt;Online&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://dillinger.io/&quot;&gt;http://dillinger.io/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://markable.in/editor/&quot;&gt;http://markable.in/editor/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://www.ctrlshift.net/project/markdowneditor/&quot;&gt;http://www.ctrlshift.net/project/markdowneditor/&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Windows / Mac&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://markdownpad.com/&quot;&gt;http://markdownpad.com/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Ubuntu/Linux&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
UberWriter&lt;/div&gt;
&lt;pre&gt;sudo add-apt-repository ppa:w-vollprecht/ppa
sudo apt-get update
sudo apt-get install uberwriter
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
ReText&lt;/div&gt;
&lt;div&gt;
&lt;pre&gt;sudo add-apt-repository ppa:mitya57 &amp;amp;&amp;amp; sudo apt-get update
sudo apt-get install retext
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/2974011471079692509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/2974011471079692509'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2013/06/tutorial-basico-sobre-markdown-guia.html' title='Tutorial básico sobre Markdown [GUIA]'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVsMsrHj4Zrd4dfHA3B9XKA4EbwXYzOtmOsqbkWWeC5P3om2WBSigF2GiOlAIY9ggHuVpQ-ct-Ia0wCnOHyyjCPq6J6XjRcZZ1xiBPPPC8V2RYsCsDJldeIc9TQmAuGg86zccyF4mGnYb1/s72-c/logo_markdown.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-943952506312542116</id><published>2013-05-29T01:30:00.001-05:00</published><updated>2013-09-05T12:14:17.291-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programación"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby on Rails"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips"/><title type='text'>Twiteando desde Ruby. Usando gema de Twitter para Ruby [Parte I]</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZItJeWYAgavohtNE3i_UUozcUq0_yLDwx3RTnHmIVYJrIVg0Qem1k4K87Z5OwvI52BeE06fbMYojrzqZ0Th7ATzLS9an8KpmrNm8enqinDm26bF5VXL622yTqG0536b2EAcAktpZiYL_4/s1600/twitter_ruby.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZItJeWYAgavohtNE3i_UUozcUq0_yLDwx3RTnHmIVYJrIVg0Qem1k4K87Z5OwvI52BeE06fbMYojrzqZ0Th7ATzLS9an8KpmrNm8enqinDm26bF5VXL622yTqG0536b2EAcAktpZiYL_4/s1600/twitter_ruby.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Hoy daremos un pequeño paseo por una de mis gemas favoritas para Ruby, hablo de la gema para Twitter, que podemos encontrar en&amp;nbsp;&lt;a href=&quot;https://github.com/sferik/twitter&quot;&gt;https://github.com/sferik/twitter&lt;/a&gt;. Como pudieron ver, si ingresaron al enlace en cuestión, hay una gran cantidad de documentación realmente útil disponible, así que para comenzar no pretendo reinventar la rueda, aunque además de lo básico también exploraremos algunas maneras ingeniosas de usar esta excelente gema.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Entonces arrancamos, y para comenzar podemos ir abriendo nuestra querida consola o terminal. De momento estoy suponiendo que ya tienes instalado Ruby en tu PC o Mac, sino instalarlo es una cosa sencilla, puedes consultar mi tutorial para Ubuntu 12.04 &lt;a href=&quot;http://blog.g3ortega.com/2013/05/instalando-ruby-con-rvm-en-5-pasos-o.html&quot; target=&quot;_blank&quot;&gt;aquí&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Instalando gema de Twitter&lt;/h3&gt;
&lt;div&gt;
&lt;pre&gt;gem install twitter&lt;/pre&gt;
&lt;br /&gt;
Luego sigue un paso necesario por razones de seguridad. En el sitio de la gema lo expresan de la siguiente manera:&lt;/div&gt;
&lt;blockquote&gt;
Para asegurar que el código que se está instalando no ha sido manipulado, se recomienda que compruebe la firma. Para ello, es necesario añadir la llave pública como un certificado de confianza (sólo es necesario hacerlo una vez)&lt;/blockquote&gt;
&lt;pre&gt;gem cert --add &amp;lt;(curl -Ls https://raw.github.com/sferik/twitter/master/certs/sferik.pem)&lt;/pre&gt;
&lt;br /&gt;
A continuación instalamos la gema con directivas de alta seguridad:
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;gem install twitter -P HighSecurity&lt;/pre&gt;
&lt;br /&gt;
&lt;h3&gt;
Creando aplicación en Twitter&lt;/h3&gt;
Ya con esto tenemos la mitad del trabajo hecho, ahora falta el otro 25%, que no son sino configuraciones que podemos hacer directamente en Twitter.&lt;br /&gt;
&lt;br /&gt;
Para ello nos vamos a &lt;a href=&quot;https://dev.twitter.com/apps/new&quot; target=&quot;_blank&quot;&gt;esta URL&lt;/a&gt;, y registramos una nueva aplicación en Twitter:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKeWlDXcfkEgTWlyDOqhA9-oROsWk6WW6lvblhbR84eD13i75ve7iuesADczta9XZIOmbXw2By4rXaS41ON_VG92Qj0WUVLJk1eDihlQ-oniErgAlPWjcppqrImyFF2y4M5OmzFB61UgQf/s1600/registrando_aplicacion_twitter.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;435&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKeWlDXcfkEgTWlyDOqhA9-oROsWk6WW6lvblhbR84eD13i75ve7iuesADczta9XZIOmbXw2By4rXaS41ON_VG92Qj0WUVLJk1eDihlQ-oniErgAlPWjcppqrImyFF2y4M5OmzFB61UgQf/s640/registrando_aplicacion_twitter.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Una vez creada nuestra aplicación nos dirigirá a otra pantalla que contiene información valiosa que utilizaremos en los pasos siguientes.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUxng5N8O9INCSAY6HryMq_zNGyLQO2vJuwhzOaY-47g9rz_JTVVw-7Ah6dNLf9uuyK2tx9ib0kGA6RkUJBm4nj70KzIV6V8vX16nSAUooVqg5t6iNDi44YC-R2ezCAEv1AuZDn3KclMSS/s1600/oauth_twitter.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;260&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUxng5N8O9INCSAY6HryMq_zNGyLQO2vJuwhzOaY-47g9rz_JTVVw-7Ah6dNLf9uuyK2tx9ib0kGA6RkUJBm4nj70KzIV6V8vX16nSAUooVqg5t6iNDi44YC-R2ezCAEv1AuZDn3KclMSS/s640/oauth_twitter.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
¿Que es OAuth y qué son Access Tokens?&lt;/h3&gt;
Los datos que necesitaremos luego son: Consumer key y Consumer secret. Pero antes de continuar abordaré un poco de qué significa OAuth y el porqué de estos datos.&lt;br /&gt;
&lt;br /&gt;
Wikipedia define OAuth de la siguiente manera:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;div style=&quot;background-color: white; font-family: sans-serif; font-size: 13px; line-height: 19.1875px; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;b&gt;OAuth&lt;/b&gt;&amp;nbsp;(&lt;i&gt;Open Authorization&lt;/i&gt;) es un protocolo abierto, propuesto por&amp;nbsp;Blaine Cook&amp;nbsp;y&amp;nbsp;Chris Messina, que permite&amp;nbsp;autorización&amp;nbsp;segura de un&amp;nbsp;API&amp;nbsp;de modo estándar y simple para aplicaciones de escritorio, móviles, y web.&lt;/div&gt;
&lt;div class=&quot;floatright&quot; style=&quot;background-color: white; border: 0px; clear: right; float: right; font-family: sans-serif; font-size: 13px; line-height: 19.1875px; margin: 0.2em 0px 0.8em 1.4em; position: relative;&quot;&gt;
&lt;a class=&quot;image&quot; href=&quot;http://commons.wikimedia.org/wiki/File:Oauth_logo.svg&quot; style=&quot;background-image: none; background-position: initial initial; background-repeat: initial initial; color: #0b0080; text-decoration: none;&quot; title=&quot;OAuth logo&quot;&gt;&lt;img alt=&quot;OAuth logo&quot; height=&quot;181&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Oauth_logo.svg/180px-Oauth_logo.svg.png&quot; srcset=&quot;//upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Oauth_logo.svg/270px-Oauth_logo.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Oauth_logo.svg/360px-Oauth_logo.svg.png 2x&quot; style=&quot;border: none; vertical-align: middle;&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: sans-serif; font-size: 13px; line-height: 19.1875px; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
Para desarrolladores de consumidores, OAuth es un método de interactuar con datos protegidos y publicarlos. Para desarrolladores de proveedores de servicio, OAuth proporciona a los usuarios un acceso a sus datos al mismo tiempo que protege las credenciales de su cuenta. En otras palabras, OAuth permite a un usuario del sitio A compartir su información en el sitio A (proveedor de servicio) con el sitio B (llamado consumidor) sin compartir toda su identidad.&lt;/div&gt;
&lt;/blockquote&gt;
De manera que de momento, tenemos una especie de llave de acceso y una clave para acceder a nuestra aplicación en twitter. Pero lo único que nos falta es acceder a nuestro perfil [o a cualquier otro] con el fin de publicar contenido y realizar acciones propias de twitter como seguir, ver información de usuarios, retwitear, etc. Y para hacer eso necesitaremos un Access Token.&lt;br /&gt;
&lt;br /&gt;
Twitter define los Access Token de la siguiente manera:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
Para hacer llamadas autorizadas a las API de Twitter, la aplicación debe primero obtener un token de acceso OAuth en nombre de un usuario de Twitter. La forma en que va a obtener esos tokens dependerá de su caso de uso.&amp;nbsp;&lt;a href=&quot;https://dev.twitter.com/docs/auth/obtaining-access-tokens&quot;&gt;https://dev.twitter.com/docs/auth/obtaining-access-tokens&lt;/a&gt;.&lt;/blockquote&gt;
&lt;h3&gt;
Configuraciones finales y generación de Access Token&lt;/h3&gt;
&amp;nbsp;Antes de continuar debemos hacer un paso adicional. De momento nuestra aplicación tiene solo permisos de lectura, pero para lo que la necesitamos en este tutorial, es necesario tener permisos de lectura y escritura.Así que estando en nuestra aplicación, nos vamos a &quot;Settings&quot; o ajustes.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjcfyGtNCdZlgZtKacXpxxmLLRd6TychdMOQsz-gFGsF8Kk5iebwdTDgfYV94VMD_PW6X_5nAN8AJcmkGnMQhalnv8ees3S0cyTZ6JOO9xM999f05OCwoIZ6qPOvBVVrwjWGbaIGjDh33l/s1600/application_options_twitter.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;48&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjcfyGtNCdZlgZtKacXpxxmLLRd6TychdMOQsz-gFGsF8Kk5iebwdTDgfYV94VMD_PW6X_5nAN8AJcmkGnMQhalnv8ees3S0cyTZ6JOO9xM999f05OCwoIZ6qPOvBVVrwjWGbaIGjDh33l/s640/application_options_twitter.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Una vez allí, nos vamos a la sección de Tipo de Aplicación, en la cual seleccionamos la última opción &quot;Read, Write and Access direct messages&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOJcv4rVokHs61RjakoAXCeesH761WszRvotJF4ViZkouLiopqNSZEqZyk1zeYmkmUm6TM4jPzsPXZR8mcX-VN2gHzYZmt6VL0j94hQIeSzCom5HVuAFPuBvSLPRvvXb2rwKDMeV8kc85V/s1600/application_type_twitter.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;278&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOJcv4rVokHs61RjakoAXCeesH761WszRvotJF4ViZkouLiopqNSZEqZyk1zeYmkmUm6TM4jPzsPXZR8mcX-VN2gHzYZmt6VL0j94hQIeSzCom5HVuAFPuBvSLPRvvXb2rwKDMeV8kc85V/s640/application_type_twitter.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Guardamos y regresamos a la sección de &quot;Details&quot;. En la parte hay un apartado para nuestro token de acceso, presionamos en &quot;Crear mi token de acceso&quot; y listo. Ya con eso tendremos los datos que necesitamos para hacer nuestras pruebas.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd9QennyUolrhA69dchEVb9BiTqrJGBiUiZH_RV4jsdvQsRimrLGBqrr4fRPBfn25nj6EXbwzjiaC5Gi4YwaMZKOPKMfpyAqf32pVL3rE40GIZuYsAcjlk8rQd1_gp0NyVXbYTLQJf5KYg/s1600/access_toke_twitterpng.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;170&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd9QennyUolrhA69dchEVb9BiTqrJGBiUiZH_RV4jsdvQsRimrLGBqrr4fRPBfn25nj6EXbwzjiaC5Gi4YwaMZKOPKMfpyAqf32pVL3rE40GIZuYsAcjlk8rQd1_gp0NyVXbYTLQJf5KYg/s640/access_toke_twitterpng.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
El &quot;Hello World&quot; del tutorial&lt;/h3&gt;
&lt;div&gt;
Muy bien, ahora que ya hemos generado los datos que necesitábamos, procederemos a configurar nuestra primera aplicación en Ruby en consola, que nos preguntará si queremos publicar un Tweet y nos dará la oportunidad de hacerlo.&lt;/div&gt;
&lt;br /&gt;
La estructura básica será la siguiente:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Primero necesitaremos incluir la gema de Twitter en nuestra aplicación:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;     require &#39;twitter&#39;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Luego vamos a necesitar todo lo que hemos generado a partir de nuestra aplicación de Twitter&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;    Twitter.configure do |config|
      config.consumer_key = &#39;TU_CONSUMER_KEY&#39;
      config.consumer_secret = &#39;TU_CONSUMER_SECRET&#39;
      config.oauth_token = &#39;TU_TOKEN_DE_ACCESO&#39;
      config.oauth_token_secret = &#39;TU_TOKEN_SECRETO&#39;
    end
&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Un poco de relleno&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;&lt;pre&gt;puts &quot;Publicar un nuevo Tweet...&quot;
tweet= gets() #Obtenemos lo que el usuario digite&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;li&gt;Y ahora es momento de la magia&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;    Twitter.update(tweet)&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;El código completo:

&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;   require &#39;twitter&#39;

  Twitter.configure do |config|
      config.consumer_key = &#39;TU_CONSUMER_KEY&#39;
      config.consumer_secret = &#39;TU_CONSUMER_SECRET&#39;
      config.oauth_token = &#39;TU_TOKEN_DE_ACCESO&#39;
      config.oauth_token_secret = &#39;TU_TOKEN_SECRETO&#39;
    end

   puts &quot;Publicar un nuevo Tweet...&quot;
   tweet= gets() #Obtenemos lo que el usuario digite

   Twitter.update(tweet)
&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;h3&gt;
&quot;Hello World&quot; con ciertas mejoras&lt;/h3&gt;
&lt;div&gt;
Ahora digamos que tenemos múltiples usuarios. Entonces que pasaría si quisieramos usar nuestra aplicación previamente creada para actualizar el estado de varios usuarios.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre&gt;   require &#39;twitter&#39;

  Twitter.configure do |config|
      config.consumer_key = &#39;TU_CONSUMER_KEY&#39;
      config.consumer_secret = &#39;TU_CONSUMER_SECRET&#39;
    end
&lt;/pre&gt;
&lt;pre&gt;     
    gerardo = Twitter::Client.new(
        :oauth_token =&amp;gt; &quot;Mi token acceso&quot;,
        :oauth_token_secret =&amp;gt; &quot;Mi acceso secreto&quot;
    )

   david = Twitter::Client.new(
        :oauth_token =&amp;gt; &quot;Su token de acceso&quot;,
        :oauth_token_secret =&amp;gt; &quot;su token secreto&quot;
    )

   puts &quot;Publicar un nuevo Tweet como Gerardo...&quot;
   tweet= gets() #Obtenemos lo que el usuario digite
   gerardo.update(tweet)

   puts &quot;Publicar un nuevo Tweet como David...&quot;
   tweet= gets() #Obtenemos lo que el usuario digite
   david.update(tweet)
&lt;/pre&gt;
&lt;br /&gt;
Eso ha sido todo para esta primera parte. En la segunda parte estaremos explorando otras interesantes caracteristicas de esta excelente gema. Si tienen dudas o problemas al respecto, favor preguntar en los comentarios. Saludos.
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/943952506312542116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/943952506312542116'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2013/05/twiteando-desde-ruby-usando-gema-de.html' title='Twiteando desde Ruby. Usando gema de Twitter para Ruby [Parte I]'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZItJeWYAgavohtNE3i_UUozcUq0_yLDwx3RTnHmIVYJrIVg0Qem1k4K87Z5OwvI52BeE06fbMYojrzqZ0Th7ATzLS9an8KpmrNm8enqinDm26bF5VXL622yTqG0536b2EAcAktpZiYL_4/s72-c/twitter_ruby.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-7973942949941526032</id><published>2013-05-28T22:54:00.001-05:00</published><updated>2013-09-05T12:14:50.205-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programación"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby on Rails"/><title type='text'>Instalando Ruby con RVM en 5 pasos o menos [Ubuntu 12.04]</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDZt9TRJWhtF-HHN_FMvCua6RyaFR173EdeeuSdqoRG9f2rEsiwjy2xzbNkbGiKXa0CSlb3GO3buJa0qDcMeuwbRNlyeDb2EYvQMTfAmztLItvYD_FXe92H7WQ_Q0jlcn-2a7crniOriig/s1600/rvm.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;148&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDZt9TRJWhtF-HHN_FMvCua6RyaFR173EdeeuSdqoRG9f2rEsiwjy2xzbNkbGiKXa0CSlb3GO3buJa0qDcMeuwbRNlyeDb2EYvQMTfAmztLItvYD_FXe92H7WQ_Q0jlcn-2a7crniOriig/s320/rvm.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Muy bien. No es un secreto que la Ruby Version Manager se ha convertido en la opción preferida por la mayoría de desarrolladores de Ruby al momento de instalar y controlar multiples entornos de trabajo para este lenguaje. Desde hace algunos meses la instalación de Ruby usando RVM se ha vuelto más sencilla, y ahora quiero explicar brevemente cómo instalar ruby en 5 pasos:&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;b&gt;Paso 1:&lt;/b&gt; Obtenemos las dependencias necesarias y algunas utilidades&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;pre&gt;$ sudo apt-get install build-essential git-core nodejs curl&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;b&gt;Paso 2:&lt;/b&gt; Obtenemos la última versión estable de la RVM&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre&gt;$ \curl -L https://get.rvm.io | bash -s stable&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Paso 3:&lt;/b&gt; Ejecutando Scripts de Configuración&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ source ~/.rvm/scripts/rvm&lt;/pre&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
Podemos comprobar que este paso se realizó con éxito digitando rvm -v lo cual nos devolverá la versión de la RVM que hemos instalado. En caso que esto no aparezca, es posible que debás cerrar la terminal y abrirla nuevamente :)&lt;/blockquote&gt;
&lt;b&gt;Paso 4: &lt;/b&gt;RVM instalará algunas dependencias para asegurarse que Ruby trabajará como debe ser :)&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;rvm autolibs enable &amp;amp;&amp;amp; rvm requirements&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Paso 5:&lt;/b&gt; Instalando Ruby
&lt;br /&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;$ rvm install 1.9.3 &amp;amp;&amp;amp; rvm use 1.9.3 --default&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
Hemos terminado, podemos verificarlo ingresando ruby -v que nos dará la versión de ruby que acabamos de instalar, en este caso la 1.9.3, en caso que tengas algún problema, favor deja un comentario, será un gusto responder a tus dudas.&lt;/blockquote&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/7973942949941526032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/7973942949941526032'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2013/05/instalando-ruby-con-rvm-en-5-pasos-o.html' title='Instalando Ruby con RVM en 5 pasos o menos [Ubuntu 12.04]'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDZt9TRJWhtF-HHN_FMvCua6RyaFR173EdeeuSdqoRG9f2rEsiwjy2xzbNkbGiKXa0CSlb3GO3buJa0qDcMeuwbRNlyeDb2EYvQMTfAmztLItvYD_FXe92H7WQ_Q0jlcn-2a7crniOriig/s72-c/rvm.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-8879308547218966803</id><published>2013-05-19T15:23:00.001-05:00</published><updated>2014-02-08T16:43:02.957-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PostgreSQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Programación"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby on Rails"/><title type='text'>Instalando y configurando PostgreSQL en Ubuntu 12.04 para desarrollar en Ruby on Rails </title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwuOtxboqzZLlknd_p7a4VugSbOqygawHJyBViuGKKCtNaGjVVwKxeg6-pCR2lFyCHT23hn4SzXhm_VhZq93Zz6nIWCqy8kxhqWW5QefI340EehHiNVFX-nx6lYhZT5Lf8dnRCMPNI1abr/s1600/logo_postgresql.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;116&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwuOtxboqzZLlknd_p7a4VugSbOqygawHJyBViuGKKCtNaGjVVwKxeg6-pCR2lFyCHT23hn4SzXhm_VhZq93Zz6nIWCqy8kxhqWW5QefI340EehHiNVFX-nx6lYhZT5Lf8dnRCMPNI1abr/s320/logo_postgresql.jpeg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Una de las tendencias actuales en cuanto a motores de bases de datos open source, es el creciente aumento en el uso de PostgreSQL para proyectos escalables y de gran envergadura. Muchas empresas están considerando migrar a PostgreSQL(si es que no lo han hecho aún) como alternativa a MySQL, ahora en manos de Oracle y con poco apoyo de parte de la comunidad, la cual se ha inclinado más hacia MariaDB.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;En este post daré una reseña rápida de instalación y configuración de PostgreSQL sobre Ubuntu 12.04 LTS. Luego veremos como integrarlo con Rails.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Instalando PostgreSQL y PgAdmin3 en Ubuntu 12.04&lt;/h3&gt;
Instalamos PostgreSQL y el paquete de desarrollo (Asegurate que sus repositorios de paquetes estén actualizados (sudo apt-get update) y si es necesario su sistema lo este también (sudo apt-get upgrade).&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ sudo apt-get install postgresql-9.1 libpq-dev&lt;/pre&gt;
&lt;br /&gt;
Acontinuación, opcionalmente podemos instalar PgAdmin para tener una GUI de administración de PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ sudo apt-get install pgadmin3&lt;/pre&gt;
&lt;br /&gt;
Ahora crearemos un usuario y lo vincularemos con nuestra sesión de usuario&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ sudo su postgres -c psql
postgres=# CREATE ROLE nombredeusuario SUPERUSER LOGIN;
postgres=# \q&lt;/pre&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;b&gt;Algunos comandos de postgresql útiles:&lt;/b&gt;\d = nos muestra la lista de relaciones en nuestra base de datos&lt;br /&gt;\d nombredetabla = nos muestra el diseño de la tabla dada&lt;br /&gt;\? = para una completa lista de comandos&lt;br /&gt;\h = para lista de comandos sql&lt;br /&gt;\h nombredecomando = nos da información sobre un determinado comando sql&lt;br /&gt;\q = para salir del cliente psql&lt;/blockquote&gt;
&lt;h3&gt;
Configuraciones en Rails&lt;/h3&gt;
Configuramos nuestr Gemfile, por defecto nos configura SQLite3 como el gestor de base de datos por defecto y agrega la gema correspondiente, podemos comentar o eliminar esa parte y agrega la gema de PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;# Quitar gema &#39;sqlite3&#39;
gem &#39;pg&#39; #Agregando gema para PostgreSQL&lt;/pre&gt;
Nos vamos a nuestro archivo de configuracion de bases de datos en &lt;i&gt;/config/database.yml&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;development:
&amp;nbsp; adapter: postgresql
&amp;nbsp; encoding: unicode
&amp;nbsp; database: nombreapp_desarrollo
&amp;nbsp; pool: 5
&amp;nbsp; timeout: 5000
&amp;nbsp; username: nombredeusuario
&amp;nbsp; password:

test:
&amp;nbsp; adapter: postgresql
&amp;nbsp; encoding: unicode
&amp;nbsp; database: nombreapp_pruebas
&amp;nbsp; pool: 5
&amp;nbsp; timeout: 5000
&amp;nbsp; username: nombredeusuario
&amp;nbsp; password:
&lt;/pre&gt;
&lt;br /&gt;
Luego dejamos que el Bundler haga su magia:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ bundle install&lt;/pre&gt;
&lt;br /&gt;
Por ultimo, en caso de que ya tuviéramos migraciones listas, creamos las migraciones y si es necesario las bases de datos tambien:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ rake db:create:all
$ rake db:migrate
&lt;/pre&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/8879308547218966803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/8879308547218966803'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2013/05/instalando-y-configurando-postgresql-en.html' title='Instalando y configurando PostgreSQL en Ubuntu 12.04 para desarrollar en Ruby on Rails '/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwuOtxboqzZLlknd_p7a4VugSbOqygawHJyBViuGKKCtNaGjVVwKxeg6-pCR2lFyCHT23hn4SzXhm_VhZq93Zz6nIWCqy8kxhqWW5QefI340EehHiNVFX-nx6lYhZT5Lf8dnRCMPNI1abr/s72-c/logo_postgresql.jpeg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-3571911438968771806</id><published>2013-05-04T17:09:00.001-05:00</published><updated>2014-02-08T10:33:24.841-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Proyectos"/><title type='text'>Aprendiendo sobre Gestión de Proyectos [Online y GRATIS]</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-nIq10c93MkIfFxNprPOQ8GwTvLyZQmfWnCzoNeUmE1ju8oeIEJhRFpmu-aExVPk2SQe6lJ_Jfwk8eWqBwrLV0Jbq5srxEcxBevoLYiODRfwdVqZ2mHnsYNyfAtm4BJ3V400VFKQUYEMj/s1600/administracion_gestion_proyectos.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;132&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-nIq10c93MkIfFxNprPOQ8GwTvLyZQmfWnCzoNeUmE1ju8oeIEJhRFpmu-aExVPk2SQe6lJ_Jfwk8eWqBwrLV0Jbq5srxEcxBevoLYiODRfwdVqZ2mHnsYNyfAtm4BJ3V400VFKQUYEMj/s320/administracion_gestion_proyectos.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Soy de la opinión que en los próximos años (sino ahora mismo) se gestará una revolución en materia de educación. De momento no&amp;nbsp;vaticino&amp;nbsp;el final de la forma tradicional de educación, a menos no al mediano plazo, pero veremos una transformación en la manara como nos formamos. Ya no dependeremos de una&amp;nbsp;institución&amp;nbsp;educativa para adquirir las competencias necesarias para desempeñar un rol en la sociedad, sino que nosotros mismos podremos decidir que aprender y en que momento. De manera que ser autodidacta será una de las cualidades mejor valoradas en el futuro.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
Justamente me dispuse a buscar algunos cursos sobre Gestión de Proyectos, enfocados en la normativa del PMI (Project Management Institute), una organización encargada de certificar profesionales y mejorar el proceso de Gestión de Proyectos. De momento me encontré con dos excelentes&amp;nbsp;vídeos&amp;nbsp;brindados gratuitamente por la EOI (Escuela de Organización Industrial) de España, muy buenos y recomendados.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/WSAtG2qkvz0&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;

&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/MO3fj8Su88o&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/3571911438968771806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/3571911438968771806'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2013/05/aprendiendo-sobre-gestion-de-proyectos.html' title='Aprendiendo sobre Gestión de Proyectos [Online y GRATIS]'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-nIq10c93MkIfFxNprPOQ8GwTvLyZQmfWnCzoNeUmE1ju8oeIEJhRFpmu-aExVPk2SQe6lJ_Jfwk8eWqBwrLV0Jbq5srxEcxBevoLYiODRfwdVqZ2mHnsYNyfAtm4BJ3V400VFKQUYEMj/s72-c/administracion_gestion_proyectos.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-3983712970049970642</id><published>2012-07-13T13:46:00.000-05:00</published><updated>2013-09-05T12:17:22.421-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programación"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips"/><title type='text'>Instalar Sublime Text 2 en Ubuntu</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCjvg2riKb58LtZmVelcD1VzvGLFaa9xXnvcYiCocHKTQ2Re5OSBdY8h9cFlNAvELHyJNHlUGOy92zM3d4TVbE9Sz7WKfJWDA6QnK8fH6BXsKy66-AKTqnFcIzSD5xKzq6C-IFwGL8XwE6/s1600/sublime_text_icon_2181.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCjvg2riKb58LtZmVelcD1VzvGLFaa9xXnvcYiCocHKTQ2Re5OSBdY8h9cFlNAvELHyJNHlUGOy92zM3d4TVbE9Sz7WKfJWDA6QnK8fH6BXsKy66-AKTqnFcIzSD5xKzq6C-IFwGL8XwE6/s1600/sublime_text_icon_2181.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Como desarrollador web he probado variedad de editores, actualmente hay muy buenas&amp;nbsp;alternativas, pero hay un problema, generalmente uso Ubuntu para desarrollar, y algunas de las mejores alternativas de editores no&amp;nbsp;están&amp;nbsp;disponibles para Linux, pero resulta que hace poco, una de las mejores alternativas que ha ido creciendo rápidamente en popularidad, anunció su disponibilidad no solo para Windows o Mac, sino para Linux también, y yo no podría estar más feliz por eso. A continuación los pasos para instalarlo.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
En mi opinión, Sublime Text 2 es un el editor de código que se puede encontrar hoy en día, algunas de sus ventajas más notables son:
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Es multiplataforma&lt;/li&gt;
&lt;li&gt;Soporte nativo para una basta cantidad de lenguajes&lt;/li&gt;
&lt;li&gt;Capacidad de extenderse mediante el uso de plugins y snippets.&lt;/li&gt;
&lt;li&gt;Paleta de comandos&lt;/li&gt;
&lt;li&gt;Autocompletado&lt;/li&gt;
&lt;li&gt;Subrayado avanzado y configurable.&lt;/li&gt;
&lt;li&gt;... y muchas más.&lt;/li&gt;
&lt;/ul&gt;
Pueden entrar a la &lt;a href=&quot;http://www.sublimetext.com/&quot; target=&quot;_blank&quot; title=&quot;Página Oficial de Sublime Text&quot;&gt;pagina oficial&lt;/a&gt; para descargarse los clientes, disponibles para Windows, Mac OS y Linux, pero en el caso de Linux, si lo que se quiere es aprovechar al máximo las funcionalidades de éste potente editor se debe instalar desde la linea de comandos, ya que al descargarlo desde la página oficial solo tendremos acceso a un ejecutable y no dispondremos de ciertas caracteristicas, por ejemplo el uso del comando &lt;strong&gt;subl&lt;/strong&gt; en la linea de&amp;nbsp;comandos.

&lt;strong&gt;Para installar Sublime Text 2 en Linux, y particularmente en Ubuntu:&lt;/strong&gt;

Agregamos el siguiente PPA:
&lt;br /&gt;
&lt;blockquote&gt;
sudo add-apt-repository ppa:webupd8team/sublime-text-2&lt;/blockquote&gt;
actualizamos:
&lt;br /&gt;
&lt;blockquote&gt;
sudo apt-get update&lt;/blockquote&gt;
Instalamos:
&lt;br /&gt;
&lt;blockquote&gt;
sudo apt-get install sublime-text-2&lt;/blockquote&gt;
Y con ello tendremos Sublime Text instalado en:
&lt;br /&gt;
&lt;blockquote&gt;
/usr/lib/sublime-text-2&lt;/blockquote&gt;
Y listo, con eso tendremos instalados el potente editor en nuestro S.O., happy coding :)
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/3983712970049970642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/3983712970049970642'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2012/07/instalar-sublime-text-2-en-ubuntu.html' title='Instalar Sublime Text 2 en Ubuntu'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCjvg2riKb58LtZmVelcD1VzvGLFaa9xXnvcYiCocHKTQ2Re5OSBdY8h9cFlNAvELHyJNHlUGOy92zM3d4TVbE9Sz7WKfJWDA6QnK8fH6BXsKy66-AKTqnFcIzSD5xKzq6C-IFwGL8XwE6/s72-c/sublime_text_icon_2181.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-3241928041704644003</id><published>2012-07-13T13:39:00.000-05:00</published><updated>2013-05-28T23:04:08.044-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ruby on Rails"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips"/><title type='text'>Configurando Git y Github para Ruby on Rails en Ubuntu 12.04</title><content type='html'>&lt;h3&gt;
&lt;/h3&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIsOa3oYys6ZvDvTRuznaurOBdWmpJyH-y6inCaObyk80L8VvyMzH19bmza7QQQX0piPrOGeiaGWLV323Pa_JfsYMzUZuEVK57cce3jPFUBmEiSpHPAgEqzqyQrown6zACwIWZItETDmPb/s1600/ror1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;img border=&quot;0&quot; height=&quot;142&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIsOa3oYys6ZvDvTRuznaurOBdWmpJyH-y6inCaObyk80L8VvyMzH19bmza7QQQX0piPrOGeiaGWLV323Pa_JfsYMzUZuEVK57cce3jPFUBmEiSpHPAgEqzqyQrown6zACwIWZItETDmPb/s320/ror1.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;Esta vez veremos como instalar, configurar y usar, Git y GitHub, trabajare con la version de Git para Linux, en este caso mi distribución es Ubuntu 12.04, pero si bien el&amp;nbsp;procedimiento&amp;nbsp;puede variar en otros sistemas operativos, éste tutorial puede servir de punto de partida para instalarlo, y una vez hecho ese primer paso, es útil para conocer como configurar una cuenta en GitHub y sincronizarla con nuestro repositorio local usando Git.&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;
Que necesitamos?&lt;/h3&gt;
&lt;strong&gt;1. Tener instalado Git&lt;/strong&gt;

Para verificar si ya hemos instalado Git simplemente ejecutamos el comando:
&lt;br /&gt;
&lt;pre&gt;git --version&lt;/pre&gt;
Si nos devuelve la versión de Git no tenemos de que preocuparnos, en mi caso la versión que tengo instalada es la 1.7.9, si nos devuelve un error entonces significa que no tenemos instalado Git y debemos hacerlo por medio del siguiente comando:
&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;sudo apt-get install git&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;strong&gt;&amp;nbsp;2. Abrir una cuenta en &lt;a href=&quot;http://github.com/&quot; target=&quot;_blank&quot; title=&quot;GitHub&quot;&gt;GitHub&lt;/a&gt;&lt;/strong&gt;

&lt;a href=&quot;https://github.com/&quot; target=&quot;_blank&quot;&gt;GitHub&lt;/a&gt; es el repositorio web de código, con control de&amp;nbsp;versiones&amp;nbsp;más grande en el mundo, muchas de las principales empresas&amp;nbsp;tecnológicas&amp;nbsp;del mundo tienen repositorios en GitHub que trabajan colaborativamente entre sus empleados o personas externas (si el proyecto en cuestión es libre). Durante el desarrollo del curso de &lt;a href=&quot;http://gerardortega.com/curso-de-ror/&quot; target=&quot;_blank&quot; title=&quot;Curso de RoR&quot;&gt;Ruby on Rails&lt;/a&gt;&amp;nbsp;usaremos Git para el control de versiones del proyecto, desplegando el código directamente en GitHub, por lo tanto será necesario que se registren en GitHub para poder seguir el proceso.
&lt;br /&gt;
&lt;h3&gt;
En resumen:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Crearemos una aplicación &amp;nbsp;en Ruby en Rails&lt;/li&gt;
&lt;li&gt;Modificaremos el archivo &lt;em&gt;.gitignore&lt;/em&gt; del directorio de nuestro nuevo proyecto&lt;/li&gt;
&lt;li&gt;Iniciaremos Git y haremos nuestro primer &lt;em&gt;commit&amp;nbsp;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Crearemos una llave SSH y configuraremos nuestro repositorio en GitHub&lt;/li&gt;
&lt;li&gt;Realizaremos algunas pruebas&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
Comencemos&lt;/h3&gt;
&lt;strong&gt;&amp;nbsp;1. Creamos una aplicación en Ruby on Rails&lt;/strong&gt;

Para crear una nueva aplicación en Ruby on Rails solo es necesario ejecutar:
&lt;br /&gt;
&lt;pre&gt;rails new nombre_la_aplicacion&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
Este comando&amp;nbsp;automáticamente&amp;nbsp;nos creará una estructura propia de rails, de preferencia podemos crear un directorio que sea unicamente para las aplicaciones que crearemos en RoR:
&lt;br /&gt;
&lt;pre&gt;mkdir proyectos_rails&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
Y dentro de ésta carpeta colocaremos nuestro proyecto que en este caso lo denominaremos &lt;em&gt;gitrails&lt;/em&gt;
&lt;br /&gt;
&lt;pre&gt;rails new gitrails&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;2. Modificamos el archivo .&lt;em&gt;gitignore&lt;/em&gt; del directorio de nuestro proyecto.&lt;/strong&gt;

Verificamos si nos encontramos en el directorio de nuestro proyecto, de no ser asi cambiamos al directorio, siguiendo con nuestro ejemplo sería:
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;cd gitrails&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
Ya dentro del directorio de nuestro proyecto procedemos a modificar el arhico .gitignore, esto lo hacemos por medio de:
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;gedit .gitignore&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
En mi caso uso &lt;a href=&quot;http://gerardortega.com/instalando-ruby-on-rails-en-ubuntu-12-04/&quot; target=&quot;_blank&quot; title=&quot;Instalar Sublime Text 2&quot;&gt;Sublime Text 2&lt;/a&gt;&amp;nbsp;asi que el comando sería un poco diferente:
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;subl .gitignore&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
En el archivo .&lt;em&gt;gitignore&lt;/em&gt; encontraremos algo como ésto:
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;# Ignore bundler config
/.bundle&lt;/pre&gt;
&lt;pre&gt;# Ignore the default SQLite database.
/db/*.sqlite3&lt;/pre&gt;
&lt;pre&gt;# Ignore all logfiles and tempfiles.
/log/*.log
/tmp&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
A esta solo agregamos algunas lineas:
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;# Ignorar otros archivos innecesarios&amp;nbsp;
doc/
*.swp
*~
.project
.DS_Store&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;strong&gt;&amp;nbsp;3. Iniciaremos Git y haremos nuestro primer commit&lt;/strong&gt;

Para iniciar Git:
&lt;br /&gt;
&lt;pre&gt;git init&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
Luego agregamos el directorio donde se encuentra nuestra aplicación en RoR:
&lt;br /&gt;
&lt;pre&gt;git add.&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
Podemos verificar que los directorios se hallan agregado con:
&lt;br /&gt;
&lt;pre&gt;git status&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
Y por último hacemos nuestro primer &lt;em&gt;commit,&amp;nbsp;&lt;/em&gt;o bien nuestra primera versión del proyecto en el que estamos trabajando:
&lt;br /&gt;
&lt;pre&gt;git commit -m &quot;Primera Versión&quot;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;em&gt;-m es el mensaje con el que se guardará la versión que estamos guardando&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;strong&gt;4. Crearemos una llave SSH y configuraremos nuestro repositorio en GitHub&lt;/strong&gt;

A estas alturas deberiamos de tener lista nuestra cuenta en GitHub, por lo tanto procedemos a crear una llave SSH para agregarla a GitHub y poder subir nuestro contenido, para ello ejecutamos el comando:
&lt;br /&gt;
&lt;pre&gt;ssh-keygen&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
Luego nos preguntará acerca de que nombre, ruta o contraseña queremos poner a nuestra llave, en mi caso no incluí ninguno de esos datos por tratarse de una prueba, pero en entornos profesionales es necesario por cuestiones de seguridad.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;

&lt;br /&gt;
&lt;br /&gt;
Ahora que tenemos nuestra llave publica creada es necesario que copiemos el contenido de nuestra llave SSH en GitHub, para eso ejecutamos:
&lt;br /&gt;
&lt;pre&gt;cat ~/.ssh/id_rsa.pub&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
En mi caso estoy usando la llave generada por defecto, si se creo una llave con un nombre diferente debe cambiarse al final del comando, luego procedemos a copiar el contenido de nuestra llave y pegarlo en Github:
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Nos vamos a herramientas, y luego en la barra lateral seleccionamos SSH Keys&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Agregamos una nueva clave SSH, pegando los el contenido de nuestra llave:

&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;A continuación se nos pedirá nuevamente nuestra contraseña, la ingresamos, y estaremos listos crear nuestro primer repositorio y sincronizarlo con nuestro proyecto local, de manera que nos vamos a&lt;a href=&quot;https://github.com/new&quot; target=&quot;_blank&quot; title=&quot;Crear nuevo repositorio&quot;&gt; http://github.com/new&lt;/a&gt; o bien nos vamos al primer icono del&amp;nbsp;menú&amp;nbsp;superior derecho...

&lt;br /&gt;
&lt;br /&gt;
Ingresamos el nombre del repositorio y opcionalmente una descripción:

&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Le damos en crear repositorio y continuación nos mostrará una página con algunos comandos que nos servirán de mucha utilidad, asi que basados en estos procedemos a configurar nuestro repositorio local, copiamos y usamos los siguientes comandos:

Ingresamos nuestro nombre...
&lt;br /&gt;
&lt;pre&gt;git config --global user.name &quot;Your Name&quot;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
Ingresamos nuestro correo...
&lt;br /&gt;
&lt;pre&gt;git config --global user.email tucorreo@gmail.com&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
Agregamos el origen...
&lt;br /&gt;
&lt;pre&gt;git remote add origin https://github.com/gerardoortega/gitrails.git&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
Y por último publicamos nuestro proyecto en GitHub usando:
&lt;br /&gt;
&lt;pre&gt;git push -u origin master&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
Al momento de publicar la primera versión de nuestro proyecto por medio del comando anterior nos pedirá nuestro nombre de usuario y contraseña.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;

&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;
&lt;strong&gt;5. Realizaremos algunas pruebas&lt;/strong&gt;

Con los pasos anteriores conseguimos sincronizar nuestro proyecto con el repositorio de Github que creamos, podemos comprobar que todo salio bien actualizando la URL de nuestro repositorio y confirmando que los archivos han sido publicados:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;

&lt;br /&gt;
&lt;br /&gt;
Por último y para conocer más de cerca las ventajas del uso de Git para el control de versiones podemos realizar las siguientes pruebas:

* Primero creamos una nueva rama o branch
&lt;br /&gt;
&lt;pre&gt;git checkout -b rama&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
Las ramas o branches nos sirven para administrar ciertas áreas del proyecto de forma completamente independiente al proyecto principal (el cual se encuentra en la rama principal llamada master), por ejemplo, en un proyecto se ven involucrados diferentes grupos de profesionales, como diseñadores, analistas, testers, etc. se puede crear una rama para cada equipo, para que puedan trabajar en sus áreas sin temor a corromper un componente del proyecto que tenga repercusiones mayores.

Para continuar con nuestro ejemplo vamos a modificar el Readme del proyecto en una rama independiente, asi que llamaremos a la rama READMEmodificado
&lt;br /&gt;
&lt;pre&gt;git checkout -b READMEmodificado&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;em&gt;(donde -b viene de branch y sirve para crear una nueva rama y checkout sirve para cambiar a una rama especifica)&lt;/em&gt;

Como hemos cambiado a la nueva rama que hemos creado (READMEmodificado) mediante el comando checkout inmediatamente podemos comenzar a trabajar sobre esta branch, por lo tanto haremos algunas modificaciones:
&lt;br /&gt;
&lt;pre&gt;rm -rf app/&lt;/pre&gt;
--con esto borramos el contenido de la carpeta app/
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;git status&lt;/pre&gt;
--para ver el estado actual y los archivos que han sido eliminados
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;git checkout -f&lt;/pre&gt;
--para volver al estado anterior a las modificaciones
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;git status&lt;/pre&gt;
--confirmamos que los cambios han sido deshechos, y todo esta como en un principio
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;rm -rf app/&lt;/pre&gt;
--volvemos a borrar el directorio app/
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;git reset --hard HEAD&lt;/pre&gt;
--regresamos al estado original de otra manera
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;rm -rf app/&lt;/pre&gt;
--borramos nuevamente el directorio
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;git commit -am &quot;Cambios estupidos&quot;&lt;/pre&gt;
--guardamos una version con los cambios que hemos hecho
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;git checkout master&lt;/pre&gt;
--cambiamos a la rama master (la principal)
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;git branch&lt;/pre&gt;
--lo usamos para saber en que rama estamos
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;git branch -D READMEmodificado&lt;/pre&gt;
--para borrar la rama que creamos hace poco
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;git checkout -b READMEmodificado&lt;/pre&gt;
--creamos nuevamente la rama que&amp;nbsp;habíamos&amp;nbsp;borrado y cambiamos a esta nueva rama
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;gedit README.rdoc&lt;/pre&gt;
--procedemos a borrar el contenido de README.rdoc y colocamos un contenido alternativo
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;git mv README.rdoc README.markdown&lt;/pre&gt;
--cambiamos la extensión del README y lo trasladamos a README.markdown
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;git commit -am &quot;README Mejorado&quot;&lt;/pre&gt;
--hacemos un commit de los cambios que hemos hecho con el nombre de &quot;README Mejorado&quot;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;git checkout master&lt;/pre&gt;
--cambiamos a la rama master
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;git merge READMEmodificado&lt;/pre&gt;
--combinamos los cambios hechos en la rama que creamos con la rama principal
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;git log&lt;/pre&gt;
-- para conocer el registro de cambio
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;git status&lt;/pre&gt;
--consultamos el estado de los cambios realizados
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;git push&lt;/pre&gt;
--publicamos los cambios en el repositorio de GitHub (ya no es necesario usar origin master, solo se usan la primera vez)

Con eso tendremos una mejor noción de lo que podemos realizar con Git, y en general darnos cuenta de lo valiosa que es esta herramienta.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/3241928041704644003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/3241928041704644003'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2012/07/configurando-git-y-github-para-ruby-on.html' title='Configurando Git y Github para Ruby on Rails en Ubuntu 12.04'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIsOa3oYys6ZvDvTRuznaurOBdWmpJyH-y6inCaObyk80L8VvyMzH19bmza7QQQX0piPrOGeiaGWLV323Pa_JfsYMzUZuEVK57cce3jPFUBmEiSpHPAgEqzqyQrown6zACwIWZItETDmPb/s72-c/ror1.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-4831976858103693857</id><published>2012-07-13T13:29:00.001-05:00</published><updated>2013-09-05T12:17:58.266-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programación"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips"/><title type='text'>Como convertirse en un codificador experto</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNhNKT3ZEtNeRVkjC8b1rhHDiKi_gzHwRm_3O6BzUasi5j_S2fXlG2ISea1Ye8vumCHxb-XtIwI2-5pW-HZa_baVsMVu_wpdn8dsoq3xEYIF1QR3I5uRCZQK1K1ayRGp0BVMmCoOgTVN33/s1600/search_engine_friendly-300x225.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNhNKT3ZEtNeRVkjC8b1rhHDiKi_gzHwRm_3O6BzUasi5j_S2fXlG2ISea1Ye8vumCHxb-XtIwI2-5pW-HZa_baVsMVu_wpdn8dsoq3xEYIF1QR3I5uRCZQK1K1ayRGp0BVMmCoOgTVN33/s1600/search_engine_friendly-300x225.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
La programación es una parte vital dentro del proceso del desarrollo web, donde la creatividad garantiza mejores resultados. Si la codificación no esta al máximo potencial, el sitio resultante no llevará a cabo lo que se espera de éste, en el tiempo acordado, y el resultado será muy pobre. Con las buenas prácticas, un aspirante a programador puede fácilmente convertirse en un experto en poco tiempo, lo cual trae muchos beneficios consigo. En este articulo quiero discutir algunos tips para convertirse en un experto en codificación..&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;
Aprende los conceptos básicos de programación&lt;/h3&gt;
Es importante aprender los conceptos básicos de programación antes de seguir adelante en el camino. En primer lugar, el aspirante debe desarrollar la bases de programación, y a continuación, crear modificaciones usando lo aprendido para perfeccionar sus habilidades. Siempre es bueno ganar conocimiento de la sintaxis y el lenguaje usado en busca de buenos resultados, pero sin olvidar que la tarea no solo consiste en saber escribir código, sino en resolver problemas con el código que se escriba.
&lt;br /&gt;
&lt;h3&gt;
Mantente alejado de los “ladrones”&lt;/h3&gt;
Mantenerse alejado de los ladrones es no trabajar con las empresas y personas que usan plantillas confeccionadas de programación. La mayoría de las empresas no se centran en tono a impartir conocimientos, sino que utilizan códigos pre-existentes para satisfacer sus necesidades. Cualquier asociación con tales delincuentes de seguro echara a perder tu creatividad en la medida de no permitir a los programadores desarrollar su potencial y excelencia al momento de codificar.
&lt;br /&gt;
&lt;h3&gt;
La aplicación de herramientas básicas de desarrollo&lt;/h3&gt;
Hay una serie de herramientas básicas de desarrollo disponibles en torno a brindar ayuda en el proceso de codificación. Utilizar estas herramientas es un aspecto beneficioso para un programador que esta dispuesto a aprender los consejos y trucos del oficio. Estas herramientas pueden ayudar ala depuración de CSS y Javascript para obtener mejores resultados. Hay algunas herramientas avanzadas que podrian ser eficaces en su uso, pero nada útiles para aprender a codificar.
&lt;br /&gt;
&lt;h3&gt;
No uses los modos tradicionales&lt;/h3&gt;
Basarse en los modos tradicionales de codificación no es una buena idea, si el aprendizaje es el objetivo. Los codificadores a menudo pasan de un editor a buscar los problemas resueltos en el navegador. En lugar de esa práctica, no ir al navegador hasta que el problema se resuelva es una buena táctica, ya que mejora el aprendizaje, brinda más conocimiento sobre el entorno en el que se trabaja y permite solucionar futuros problemas porque se conoce el más a fondo las herramientas.
&lt;br /&gt;
&lt;h3&gt;
Preferir la codificación manual&lt;/h3&gt;
Dar preferencia a la codificación manual es otro paso en la dirección de aprender, usando consejos y trucos de la codificación. El uso de generadores de código no es una buena señal, ya que mata cualquier posibilidad de que se desate la creatividad. Escribir CSS con un generador de código de hecho te ahorrará mucho tiempo, pero no ofrece nada nuevo de aprender para un codificador novato. Cuando la sintaxis está escrita de forma manual, tienes la oportunidad de aprender muchas posibilidades para un desarrollador.
&lt;br /&gt;
&lt;h3&gt;
Evita la labor de “copy and paste”&lt;/h3&gt;
Evitar el copiar y pegar es una de las cosas más importantes que un programador puede hacer para aprender mejores habilidades. El código debe ser escrito de manera manual para obtener nuevas habilidades y sobretodo el hecho de tomar un fragmento de código, copiarlo y pegarlo sin ningún esfuerzo, no agrega ningún valor agregado a nuestro independizar.
&lt;br /&gt;
&lt;h3&gt;
Nunca prefieren máquina o ayudantes&lt;/h3&gt;
Preferir una máquina para generar códigos o la búsqueda de un editor, donde el trabajo manual es cercano a cero es una mala estrategia. De esta manera, un codificador, de nuevo, no va a aprender nada. Cuando un editor se ha seleccionado, le salva de todo tipo de problemas y le da un amplio margen de aprendizaje. Así que tener un editor de utilidad es más beneficioso que cualquier máquina o ayudantes cuando el objetivo es aprender el código.
&lt;br /&gt;
&lt;h3&gt;
Conclusión&lt;/h3&gt;
No es fácil convertirse en un experto en la codificación, ya que en principio, un montón de trabajo duro tiene que ser hecho en el proceso. Ser creativo es el primer paso para convertirse en un programador experto.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/4831976858103693857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/4831976858103693857'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2012/07/como-convertirse-en-un-codificador.html' title='Como convertirse en un codificador experto'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNhNKT3ZEtNeRVkjC8b1rhHDiKi_gzHwRm_3O6BzUasi5j_S2fXlG2ISea1Ye8vumCHxb-XtIwI2-5pW-HZa_baVsMVu_wpdn8dsoq3xEYIF1QR3I5uRCZQK1K1ayRGp0BVMmCoOgTVN33/s72-c/search_engine_friendly-300x225.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-1368986884715218470</id><published>2012-07-13T13:11:00.003-05:00</published><updated>2013-09-05T12:18:30.201-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="Programación"/><title type='text'>Las mejores prácticas para programar en HTML5</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW_6JT1_Qg6t-t7hKswpDz8HVRnwfan5QrRZWLCU4rFpVWufQHABd49id-2EkU6fQ4nbY-PehyZ9P3ooW0UW2o8HlQTZecHy9rCI6NDAfNqVmRq85Avn9YrZhsqqYpPzq4Z9sL20PkA_g2/s1600/html5-300x186.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW_6JT1_Qg6t-t7hKswpDz8HVRnwfan5QrRZWLCU4rFpVWufQHABd49id-2EkU6fQ4nbY-PehyZ9P3ooW0UW2o8HlQTZecHy9rCI6NDAfNqVmRq85Avn9YrZhsqqYpPzq4Z9sL20PkA_g2/s1600/html5-300x186.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
A continuación publico una lista de algunas de las mejores prácticas para programar en HTML5, entre estás Usar un generador de código HTML5, usar una cheat sheet o hoja de trucos como&amp;nbsp;guía&amp;nbsp;en tus desarrollos, revisar la compatibilidad de tus aplicaciones, como habilitar HTML5 en versiones viejas de Internet Explorer IE6, IE7 y IE8, utilizar correctamente los&amp;nbsp;elementos&amp;nbsp;HTML5 y por último validar tu código.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;
Usa un generador&lt;/h3&gt;
Cuando se construye un sitio web, a menudo comienzan con una plantilla de base que se puede adaptar a sus necesidades. En lugar de escribir todo el código HTML5 desde el principio (ideal cuando recién estamos aprendiéndolo), puedes ahorrar tiempo mediante el uso de algunos generadores HTML5 muy útiles, disponibles en linea. Su uso es bastante fácil: se llena un formulario básico para configurar las opciones deseadas, haces clic en un botón y listo, una plantilla HTML5 básica ha sido generada para ti.

Hay un montón de generadores HTML5, en particular recomiendo &lt;a href=&quot;http://switchtohtml5.com/&quot; target=&quot;_blank&quot;&gt;SwitchToHTML5&lt;/a&gt; Y &lt;a href=&quot;http://shikiryu.com/html5/&quot; target=&quot;_blank&quot;&gt;Shikiryu generator&lt;/a&gt;, que tiene algunas opciones más que el primero.

Y si prefieres un producto más completo y listo para usar,&lt;a href=&quot;http://html5boilerplate.com/&quot; target=&quot;_blank&quot;&gt; HTML5 Boilerplate&lt;/a&gt; es lo que necesitas.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;

&lt;a href=&quot;http://gerardortega.com/wp-content/uploads/2012/06/HTML5_Template_Generator_lightbox.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-307 aligncenter&quot; height=&quot;408&quot; src=&quot;http://gerardortega.com/wp-content/uploads/2012/06/HTML5_Template_Generator_lightbox.jpg&quot; title=&quot;HTML5_Template_Generator_lightbox&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;

&amp;nbsp;
&lt;br /&gt;
&lt;h3&gt;
Usa una hoja de trucos (cheat sheet)&lt;/h3&gt;
Con las nuevas adiciones o cambios en HTML5 que suceden con bastante frecuencia, puede llegar a ser difícil recordar todas las características nuevas y variadas. Una de las mejores herramientas para mantener a la vista las etiquetas de HTML5 y sus propiedades, es sin duda los cheat sheets creados por InMotion Hosting.

Las cheat sheets o hojas de trucos se dividen en tres sencillas imagenes imprimibles: Etiquetas, Atribibutos de controladores de eventos y soporte de navegadores.

Las tres ojas de trucos las puedes descargar &lt;a href=&quot;http://www.inmotionhosting.com/infographics/html5-cheat-sheet/&quot; target=&quot;_blank&quot;&gt;aquí&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;

&lt;a href=&quot;http://gerardortega.com/wp-content/uploads/2012/06/html5_cheat_sheet_tags.png&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;wp-image-308 aligncenter&quot; height=&quot;412&quot; src=&quot;http://gerardortega.com/wp-content/uploads/2012/06/html5_cheat_sheet_tags.png&quot; title=&quot;html5_cheat_sheet_tags&quot; width=&quot;600&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;
Ten cuidado con los asuntos de compatibilidad&lt;/h3&gt;
HTML5 es una nueva tecnología, que ya se puede usar en los principales navegadores del mercado en sus versiones más recientes, pero hay que recordar que varias especificaciones no han sido implementadas en algunos navegadores.

&lt;a href=&quot;http://caniuse.com/&quot; target=&quot;_blank&quot;&gt;CanIUse.com&lt;/a&gt; es definitivamente un sitio web para tener en cuenta si estas desarrollando páginas web en HTML5. Es la herramienta más completa para conocer rápidamente si un elemento cuenta con soporto en un navegador especifico. &lt;a href=&quot;http://caniuse.com/&quot; target=&quot;_blank&quot;&gt;CanIUse.com&lt;/a&gt; también contiene tablas de compatibilidad para CSS3, SVG y JavaScript.
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://gerardortega.com/wp-content/uploads/2012/06/caniuse.png&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;wp-image-310 aligncenter&quot; height=&quot;359&quot; src=&quot;http://gerardortega.com/wp-content/uploads/2012/06/caniuse-1024x641.png&quot; title=&quot;caniuse&quot; width=&quot;574&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;
&lt;br /&gt;
&lt;h3&gt;
Conoce cómo habilitar HTML5 en versiones antiguas de IE&lt;/h3&gt;
Internet Explorer siempre ha sido un dolor de cabeza para los desarrolladores web y diseñadores. Estoy bastante seguro que la mayoría de los lectores deben tener experiencias de hacer que una pagina web funcione correctamente en IE6 y IE7... a pesar que las nuevas versiones de IE son mucho mejores de lo que solía ser, la pesadilla del desarrollador no ha terminado aún. De hecho, IE8 y las versiones anteriores no entienden absolutamente nada de HTML5.

La buena noticia es que un pequeño script permite habilitar HTML5 en Internet Explorer 8 y versiones anteriores. El uso del script es muy simple, basta con pegar el siguiente código en la sección &amp;lt;head&amp;gt; de nuestros documentos en HTML5:
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;lt;!--[if lt IE 9]&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;lt;script src=&quot;http://html5shim.googlecode.com/svn/trunk/html5.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;lt;![endif]--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
Otra herramienta muy útil para tener en cuenta es &lt;a href=&quot;http://modernizr.com/&quot; target=&quot;_blank&quot;&gt;Modernizr&lt;/a&gt;, una completa biblioteca JavaScript que te ayudará a crear páginas web HTML5 que funcionen perfectamente en todos los navegadores.

Usar Modernizr es bastante fácil. Sólo tienes que ir a la &lt;a href=&quot;http://modernizr.com/&quot; target=&quot;_blank&quot;&gt;página siguiente&lt;/a&gt;, para especificar las propiedades HTML5/CSS3 que vayas a utilizar, a continuación, descarga el script generado. Incluyelo en la cabecera &amp;lt;head&amp;gt; de tu documento, y ya está. Modernizr detectará las característica que se puedan utilizar en el navegador del cliente y agregará cases en la etiqueta &amp;lt;html&amp;gt;. Si una función es compatible con el navegador, esa característica se añade por con su nombre y se adiere a la etiqueta para sustituir la funcionalidad. Si la función no está disponible, la clase se agrega y se le antepone un “no-”.
&lt;br /&gt;
&lt;h3&gt;
Utilice elementos correctamente&lt;/h3&gt;
Antes de HTML5, soliamos codificar los sitios web usando muchos elementos &amp;lt;div&amp;gt;. El mayor problema con ésta técnica es, sin duda, que el código fuente se pude hacer dificil de leer. Es por eso que HTML5 introdujo nuevas etiquetas para usarse en lugar de la antigua &amp;lt;div&amp;gt;.

Estas nuevas etiquetas incluyen header (cabecera), footer (pie de página), article (artículo), section (sección), aside (a un lado, aparte), nav (navegación) y muchas otrás. Un documento HTML5 básico debe tener el siguiente aspecto:
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;lt;!doctype html&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;lt;html lang=&quot;en&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt; &lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;lt;meta charset=&quot;utf-8&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt; &lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt; &lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;lt;header&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt; &lt;span style=&quot;font-size: xx-small;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt; &lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;&lt;/span&gt;

&lt;span style=&quot;color: black;&quot;&gt; &lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;lt;div role=&quot;main&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt; &lt;span style=&quot;font-size: xx-small;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt; &lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;

&lt;span style=&quot;color: black;&quot;&gt; &lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;lt;footer&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt; &lt;span style=&quot;font-size: xx-small;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt; &lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;lt;/footer&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;h3&gt;
Valida tu código&lt;/h3&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Después de codificar tu pagina en HTML5, la forma más rápida y más eficaz para asegurarte de que tu código es semánticamente correcto es, en efecto mediante un proceso de validación. Un buen viejo amigo, el &lt;a href=&quot;http://validator.w3.org/&quot; target=&quot;_blank&quot;&gt;W3C Validator&lt;/a&gt; puede validar tus páginas HTML5 y te mostrará si haz cometido algún error. Es una gran herramienta para el control de calidad.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/1368986884715218470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/1368986884715218470'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2012/07/las-mejores-practicas-para-programar-en.html' title='Las mejores prácticas para programar en HTML5'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW_6JT1_Qg6t-t7hKswpDz8HVRnwfan5QrRZWLCU4rFpVWufQHABd49id-2EkU6fQ4nbY-PehyZ9P3ooW0UW2o8HlQTZecHy9rCI6NDAfNqVmRq85Avn9YrZhsqqYpPzq4Z9sL20PkA_g2/s72-c/html5-300x186.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-1111974078020826041</id><published>2012-07-13T13:00:00.004-05:00</published><updated>2013-09-05T12:19:34.576-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programación"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby on Rails"/><title type='text'>Entorno de Desarrollo de Ruby on Rails en Ubuntu 12.04</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0vWNkVopeLKJD5UkMbEx0VHUSqOxktg3pNl6jlKRDmwczE65XeqN_7fRP75YPrdb6zGzvoFYPh3HCgaKcH9cOY-B42v-Nls0sK2tRNpd28O9DPYqiCVhCLbH2dBjpwdPP6yGVmqr0Mf7-/s1600/ubuntu-ruby-rails-300x163.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0vWNkVopeLKJD5UkMbEx0VHUSqOxktg3pNl6jlKRDmwczE65XeqN_7fRP75YPrdb6zGzvoFYPh3HCgaKcH9cOY-B42v-Nls0sK2tRNpd28O9DPYqiCVhCLbH2dBjpwdPP6yGVmqr0Mf7-/s1600/ubuntu-ruby-rails-300x163.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&amp;nbsp;Recientemente cree una &lt;a href=&quot;http://xoloweb.blogspot.com/2012/07/instalando-ruby-en-linux-ubuntu-1204.html&quot; target=&quot;_blank&quot;&gt;guia de instalación de Ruby on Rails para Ubuntu 12.04&lt;/a&gt;, pero hoy he decido crear una nueva guia de instalación de RoR para Ubuntu 12.04 Precise Pangolin de una manera más simple y directa, recuerda que hay muchas maneras de hacer las cosas y que estos son mis ajustes y preferencias, pero como siempre tu puedes adaptarlos a tu manera de trabajo, asi que aquí voy:&lt;/div&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;

Paso 1: Obtenga los repositorios y las actualizaciones de listas de ejecución.&lt;/h3&gt;
&lt;pre&gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;/pre&gt;
&lt;h3&gt;

Paso 2: Agregar las aplicaciones requeridas.&lt;/h3&gt;
[fancy_code_box]sudo apt-get install build-essential openssl libreadline6 libreadline6-dev git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion ruby ncurses-term mercurial ruby-dev exuberant-ctags libnotify-bin curl make ssh openjdk-6-jdk git-doc imagemagick postgresql-contrib libpq-dev postgresql pgadmin3 vim vim-rails vim-gnome nodejs[/fancy_code_box]
&lt;br /&gt;
&lt;h3&gt;

Paso 3: Configurar github, porque como sabes todo el mundo esta usando github.&lt;/h3&gt;
&lt;pre&gt;git config --global user.name git-username&lt;/pre&gt;
&lt;pre&gt;git config --global user.email git-email-address&lt;/pre&gt;
&lt;pre&gt;ssh-keygen -t rsa -C git-email-address&lt;/pre&gt;
Si tienes una cuenta de github, debes saber cómo agregar la clave que acaba de ser generarada en tu cuenta de GitHub. Si no lo sabes, por favor consulta la documentación que ofrece github siguiendo este &lt;a href=&quot;https://help.github.com/articles/generating-ssh-keys&quot; target=&quot;_blank&quot;&gt;ENLACE&lt;/a&gt;, o bien ve al post que realice, donde hablo del tema &lt;a href=&quot;http://gerardortega.com/configurando-git-y-github-para-ruby-on-rails-en-ubuntu-12-04/&quot; target=&quot;_blank&quot;&gt;aquí&lt;/a&gt;.
&lt;br /&gt;
&lt;h3&gt;

Paso 4: Instalar RVM, Ruby y Rails&lt;/h3&gt;
Éste en realidad ha cambiado un poco. Puede hacer las cosas de la misma manera como siempre lo haz hecho, sin embargo, también puede ejecutar un comando e instalar rvm, Ruby 1.9.3 y la última versión de Rails, que en el momento de este post era 3.2.6.
&lt;br /&gt;
&lt;pre&gt;curl -L https://get.rvm.io | bash -s stable --rails
echo &#39;[[ -s &quot;$HOME/.rvm/scripts/rvm&quot; ]] &amp;amp;&amp;amp; . &quot;$HOME/.rvm/scripts/rvm&quot; # Load RVM function&#39; &amp;gt;&amp;gt; ~/.bashrc 
source .bashrc&lt;/pre&gt;
Tienes un entorno de desarrollo en marcha, pero yo nunca termino con el mínimo, y tú tampoco deberías!
&lt;br /&gt;
&lt;h3&gt;

Paso 5: Instalación de algunas otras gemas&lt;/h3&gt;
No es necesario todo esto, y lo más probable es que los incluya en su Gemfile para la aplicación que desea utilizar, y esa es probablemente la manera correcta, pero usualmente se requiere de algunas otrás gemas, en particular estas son algunas de las que he estado probando.
&lt;br /&gt;
&lt;pre&gt;heroku taps guard guard-rails guard-test guard-livereload pg capistrano rvm-capistrano devise cancan paperclip simple_form delayed_job rails_admin contact_us qwandry twitter-bootstrap-rails ZURB-foundation annotate pry prawn&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&amp;nbsp;
&lt;br /&gt;
&lt;h3&gt;

Herramientas de desarrollo, útiles para trabajar con Ruby on Rails&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;
&lt;h4&gt;

Instalando Gedit-Gmate&lt;/h4&gt;
Agrega esteroides para Rails al editor Gedit
&lt;br /&gt;
&lt;pre&gt;sudo apt-add-repository ppa:ubuntu-on-rails/ppa
sudo apt-get update
sudo apt-get install gedit-gmate&lt;/pre&gt;
&lt;h4&gt;

Instalando Sublime Text 2&lt;/h4&gt;
En&amp;nbsp;resumen&amp;nbsp;mi editor de código favorito, con amplio soporte para Rails.
&lt;br /&gt;
&lt;pre&gt;sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text&lt;/pre&gt;
&lt;h4&gt;

Instalando Retext 1.0 (Editor de markdowns)&lt;/h4&gt;
&lt;pre&gt;sudo add-apt-repository ppa:mitya57
sudo apt-get update
sudo apt-get install retext&lt;/pre&gt;
&lt;h4&gt;

Configurando Vim para Rails&lt;/h4&gt;
&lt;pre&gt;curl -Lo- https://bit.ly/janus-bootstrap | bash&lt;/pre&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/1111974078020826041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/1111974078020826041'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2012/07/entorno-de-desarrollo-de-ruby-on-rails.html' title='Entorno de Desarrollo de Ruby on Rails en Ubuntu 12.04'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0vWNkVopeLKJD5UkMbEx0VHUSqOxktg3pNl6jlKRDmwczE65XeqN_7fRP75YPrdb6zGzvoFYPh3HCgaKcH9cOY-B42v-Nls0sK2tRNpd28O9DPYqiCVhCLbH2dBjpwdPP6yGVmqr0Mf7-/s72-c/ubuntu-ruby-rails-300x163.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-8712656515222360772</id><published>2012-07-13T12:54:00.002-05:00</published><updated>2013-09-05T12:19:17.001-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programación"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>Porqué aprender a programar en Ruby, algunas razones para aprender Ruby</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCPYMOeyhtG8rvB1p0kWemQisL2AyN1xricfXvx4gTJWZhHVwnIDskNxq5SmUFaBGKCISxJcx11KcvvFKdInaoQsFat2L-Hfr3DQEr-jBSPBWyrQOLntiTTBVeOBK7a_-vxgg1CxtPkkh7/s1600/ruby-logo_grafic.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCPYMOeyhtG8rvB1p0kWemQisL2AyN1xricfXvx4gTJWZhHVwnIDskNxq5SmUFaBGKCISxJcx11KcvvFKdInaoQsFat2L-Hfr3DQEr-jBSPBWyrQOLntiTTBVeOBK7a_-vxgg1CxtPkkh7/s200/ruby-logo_grafic.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;Como parte de mover las entradas relacionadas al Diseño y Desarrollo Web de mi blog hacia este secundario, esta vez traigo el post donde explico algunas de las razones por las que debes aprender a desarrollar en Ruby.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;Cuando descubrí Ruby, me di cuenta que había encontrado lo que había estado buscando. Más que cualquier otro lenguaje con el que he trabajado. Ruby es un caso especial. Puedes concentrarte en la solución de los problemas del negocio, en lugar de luchar con los problemas del compilador y el lenguaje. Esto puede ayudarte a convertirte en un mejor programador, dándote la oportunidad de pasar más tiempo en la creación de soluciones para los usuarios y no para el compilador.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;En años recientes, Ruby ha evolucionado muy bien. Un gran número de métodos se han añadido he incorporado en las clases y módulos existentes, y el tamaño de las librerías estándar (las bibliotecas incluidas en la distribución de Ruby) ha crecido enormemente. La comunidad ahora cuenta con un sistema de documentación estándar (RDoc), y RubyGems se ha convertido en el sistema de elección para el empaquetado de código en Ruby para su distribución. Contamos con el mejor framework de desarrollo web de su clase, Ruby on Rails, con otras excelente alternativas. Somos lideres en el mundo en lo que pruebas se refiere, con herramientas como RSpec y Cucumber, y se esta trabajando en la solución a difíciles problemas como el empaquetado o la gestión de dependencias, con excelentes resultados hasta ahora. Definitivamente Ruby es un lenguaje maduro, que debes probar.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;He comenzado a publicar &lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;pequeñas guías acerca de Ruby on Rails&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;, pero he decidido complementarlas con algunas lecciones de Ruby, porque aprender Rails sin saber Ruby, es como querer conducir una motos, sin saber andar en bicicleta, así que espera próximamente algunas lecciones de Ruby, pero si eres impaciente como yo, querras comenzar ya… así que aquí te dejo algunas guías y tutoriales que te ayudarán:&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a href=&quot;http://tryruby.org/&quot;&gt;http://tryruby.org&lt;/a&gt;&lt;br /&gt;
Un sitio que te servirá de guía para aprender Ruby.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.ruby-lang.org/es/documentation/quickstart/&quot;&gt;http://www.ruby-lang.org/es/documentation/quickstart/&lt;/a&gt;&lt;br /&gt;
Una pequeña guía de introducción desde la página oficial&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.ruby-lang.org/es/documentation/ruby-from-other-languages/&quot;&gt;http://www.ruby-lang.org/es/documentation/ruby-from-other-languages/&lt;/a&gt;&lt;br /&gt;
¿Vienes desde otros lenguajes de programación? Esta pequeña guía te servirá de gran ayuda&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.codeschool.com/courses/rails-for-zombies&quot;&gt;http://www.codeschool.com/courses/rails-for-zombies&lt;/a&gt;&lt;br /&gt;
Por último, quiero dejarte este sitio, para que tengas una probadita de Ruby on Rails.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;

Extras&lt;/h3&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;Si todavía quieres mas razones para usar Ruby, te dejo con la conferencia que diera David Hansson (creador de Ruby on Rails). La conferencia està en ingles, y se centra menos en técnicas de programación y mas en la filosofía de Ruby, en general ¿Que hace a Ruby un lenguaje perfecto para ti y tus amigos? Hansson tiene la respuesta:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;img src=&quot;http://gerardortega.com/wp-includes/js/tinymce/themes/advanced/img/trans.gif&quot; /&gt;

&lt;iframe frameborder=&quot;0&quot; height=&quot;338&quot; src=&quot;http://player.vimeo.com/video/17420638?byline=0&amp;amp;portrait=0&amp;amp;color=ffffff&quot; width=&quot;600&quot;&gt;&lt;/iframe&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/8712656515222360772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/8712656515222360772'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2012/07/porque-aprender-programar-en-ruby.html' title='Porqué aprender a programar en Ruby, algunas razones para aprender Ruby'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCPYMOeyhtG8rvB1p0kWemQisL2AyN1xricfXvx4gTJWZhHVwnIDskNxq5SmUFaBGKCISxJcx11KcvvFKdInaoQsFat2L-Hfr3DQEr-jBSPBWyrQOLntiTTBVeOBK7a_-vxgg1CxtPkkh7/s72-c/ruby-logo_grafic.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-4948090810954311547</id><published>2012-07-13T11:12:00.000-05:00</published><updated>2013-09-05T12:21:24.080-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programación"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>Instalar Ruby en Windows y Linux - [Aprender Ruby Básico - Parte 1]</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuc0rrU3x3ib7P5Zkr4A4hUGRW75eB1BuCbbjWqsiuNXOIcu4hfLBjS82g4GBx05v5HKbX30UBqYZF6UEf14UmJDVcXm-jCb1y7RyS-022MWQYwMKdnMtcbWgsY7hdrQd6XpdUEq7Dpirs/s1600/ruby.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuc0rrU3x3ib7P5Zkr4A4hUGRW75eB1BuCbbjWqsiuNXOIcu4hfLBjS82g4GBx05v5HKbX30UBqYZF6UEf14UmJDVcXm-jCb1y7RyS-022MWQYwMKdnMtcbWgsY7hdrQd6XpdUEq7Dpirs/s200/ruby.png&quot; width=&quot;199&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Con éste post comenzaré la serie para aprender lo básico sobre Ruby, luego les prometo postear algo sobre Sinatra, Capistrano, Heroku y por supuesto Rails. Mientras durante las próximas dos semanas, estaré publicando un curso de Ruby Básico, que servirá para introducirte al mundo de éste genial&amp;nbsp;lenguaje de programación, en esta&amp;nbsp;lección&amp;nbsp;veremos algunas razones para aprender Ruby, la instalación de Ruby en Windows y Linux, y por último una introducción al IRS (Interactive Ruby Shell).&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;



&lt;span style=&quot;background-color: white;&quot;&gt;Porque Ruby?&lt;/span&gt;&lt;/h3&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;Antes de iniciar, veamos algunas de las razones por las cuales querrias aprender Ruby. Hay buenas razones para pensar que ya sabes algo de PHP o de alguno de los &quot;populares&quot; lenguajes del lado del servidor, entonces, valdrá la pena aprender Ruby?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Aqui estan algunas razones por las cuales uso Ruby, y que lo hacen un irresistible lenguaje:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;Ruby es flexible&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;En el proceso de aprendizaje de Ruby descubrirás que hay muchas maneras diferentes de codificar la misma parte de una funcionalidad. Ésto significa que como desarrollador puedes elegir la manera más expresiva de explicar lo que estas haciendo. Muchos desarrolladores dicen que Ruby les permite escribir su código como si lo estuvieran hablando. Es a causa de la flexibilidad.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b style=&quot;background-color: white;&quot;&gt;Ruby es fácil de aprender&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Ruby tiene una curva de aprendizaje bastante pequeña; luego que veas algunos screencast por tu cuenta, encontrarás que estarás comodo con la sintaxis y las ideas del lenguaje. Muy pronto te estaré enseñando lo básico de Ruby y empezarás a codificar, pero solo serás mejor si aprendes más, lee un libro, visita las comunidades del tema, busca videos del tema en Youtube...&lt;/div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b style=&quot;background-color: white;&quot;&gt;Ruby tiene muchos Frameworks geniales&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
El framework obvio aca es Ruby on Rails. Sin embargo, hay muchos otros grandiosos frameworks, ya sea para la web o no, les hecharemos un vistazo durante éstas lecciones.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;Ruby parece simple por encima, pero es complejo por debajo.&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;Finalmente, me gusta Ruby porque a menudo parece simple superficialmente. Sin embargo, esa simplicidad enmascara una enorme complejidad. Por ejemplo, algunas funcionalides que he escrito en otros lenguajes ya estan integradas en Ruby, permitiendome unicamente escribir un par de lineas de código.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;Espero te hayas convencido que aprender Ruby es una buena inversión. Una cosa más: Quita el pensamiento de que Ruby es solo un lenguaje web del lado del servidor. Aunque puede serlo perfectamente, tienes que saber que además hay mucho Ruby fuera de la web, recientemente ha hecho su incursion en plataformas mobiles y en aplicaciones de escritorio integrales. Ruby no es un simple lenguaje web.&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;






Instalando Ruby en Windows&lt;/h3&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;Instalar Ruby en Windows es realmente simple- Solo debes ir al sitio web de Ruby y dar clic en &quot;Download Ruby&quot; a la derecha. Luego desplazate hacia abajo hasta encontrar la sección &quot;Ruby on Windows&quot;, veráz que la más sencilla manera de hacerlo es usando RubyInstaller. Ahora mismo, escogeremos la última versión de Ruby, la cual es 1.9.2p???. Descargala e instalala, como cualquier otro programa de Windows.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Una vez que la hayas instalado, es bastante simple asegurarte que todo esta trabajando bien. Solo abre la linea de comandos e ingresa:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
ruby --version&amp;nbsp;&lt;/blockquote&gt;
&lt;br /&gt;
Estuvo fácil no?&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;






Instalando Ruby en Linux (Ubuntu 12.04)&lt;/h3&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Para el caso de Linux, el procedimiento es un poco más largo, usaremos la RVM que nos servirá además para controlar diferentes versiones de Ruby en una sola maquina, como anteriormente habia creado un post sobre el tema, solo les dejo el enlace para que lleven a cabo la instalación:&lt;/div&gt;
&lt;br /&gt;
&lt;a href=&quot;http://xoloweb.blogspot.com/2012/07/instalando-ruby-en-linux-ubuntu-1204.html&quot; target=&quot;_blank&quot;&gt;Instalando Ruby con RVM en Linux&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;






Conociendo el IRB (Interactive Ruby Shell)&lt;/h3&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;Ahora que tenemos Ruby instalado, hechemos un vistaso a una de las principales herramientas que usaremos en las lecciones, llamada IRB que es una especie de linea de comandos shell que interactua directamente con Ruby. En mi caso usando Ubuntu solo debo ingresar irb en la consola y automaticamente entro en la IRB (Para salir bajo linux de irb presiona Ctrl + c) , asi que puedo desde ya hacer algunas operaciones, por ejemplo prueba con ingresar:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
1 + 2 #Realiza una suma sencilla&lt;br /&gt;
print(&quot;Hello World&quot;) #Imprime en pantalla &quot;Hello World&quot;&lt;br /&gt;
puts &quot;Hola Mundo&quot; #Imprime en pantalla &quot;Hola Mundo&quot;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Puedes probar otras sentencias más complejas, de paso quiero recomendarte Try Ruby, un curso interactivo de 15 minutos sobre Ruby que te ayudará además a familirizarte con la IRB. Como podrás apreciar, luego de escribir una linea de código (y presionar enter), verás la evaluación de la linea que ingresaste, justo después de la flecha.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Al ejecutar las sentencias de arriba, print y puts (put string) son llamados a funciones. Nota que en una, se ha incluido el parametro en parentisis y en otra no. Comunmente en Ruby, los parentisis en el llamado de una función son opcionales. Yo pude haber llamado a print sin éstos, o a puts con éstos. Dependerá de tu sentido de stylo! También puedes ver que retornan nil (Equivalente a null en otros lenguages), lo que para Ruby es un valor nulo.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Como conclusión a la lección de hoy, veamos como se escribe una función. Puedes escribir una función en IRB: es lo suficiente inteligente para darse cuenta que necesita más antes de que pueda evaluar la función, y no retornara un valor despues de cada linea de código:&lt;/div&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;def saludo #enter
return &quot;Hola que tal?&quot; #enter
end
=&amp;gt; nill #retorna un valor nill
def saludo2 #enter
&quot;no es necesario un return&quot; #enter
end
=&amp;gt; nill #determina que el parametro es nulo y lo retorna
saludo #ejecutamos la primera función
=&amp;gt; &quot;Hola que tal?&quot; #retorna el valor de la función
saludo2 #ejecutamos la segunda función
=&amp;gt; &quot;no es necesario un retorno&quot;&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Esto demuestra el siguiente principio de la sintaxis en Ruby: si bien puedes usar return al final de una función si asi lo deseas, no es necesario. Las funciones en Ruby automaticamente retornaran la evaluación de la última linea de la funcion. Por supuesto, utilizaras return cuando escribas funciones más complejas, como aquellas con multiples posibles valores.&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;






Conclusión&lt;/h3&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;En este tutorial, el primero en la serie &quot;Aprender Ruby Básico&quot;, hemos instalado Ruby en nuestras computadoras y hechado un vistazo al IRB, una herramienta muy importante que será usada a menudo mientras exploremos un poco más de Ruby. Gracias por leerlo, y dejanos saber tus comentarios al respecto.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/4948090810954311547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/4948090810954311547'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2012/07/instalar-ruby-en-windows-y-linux.html' title='Instalar Ruby en Windows y Linux - [Aprender Ruby Básico - Parte 1]'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuc0rrU3x3ib7P5Zkr4A4hUGRW75eB1BuCbbjWqsiuNXOIcu4hfLBjS82g4GBx05v5HKbX30UBqYZF6UEf14UmJDVcXm-jCb1y7RyS-022MWQYwMKdnMtcbWgsY7hdrQd6XpdUEq7Dpirs/s72-c/ruby.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7171548331369560991.post-8522507207564472675</id><published>2012-07-13T09:43:00.002-05:00</published><updated>2013-09-05T12:21:48.350-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programación"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>Instalando Ruby en Linux - Ubuntu 12.04</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSpPte6fybHgf1BO7Wa3HurCFfnNqt76D-2upY2vcnfwHivauSX8QeyA4JS-lpQdyiEEifRto33BfMQbuq9K3fVGK_lIsIVP045CPwq-0p1Sf2DV6P9S9igg7bMwzgroJXA189WRN9kqWk/s1600/rvm.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSpPte6fybHgf1BO7Wa3HurCFfnNqt76D-2upY2vcnfwHivauSX8QeyA4JS-lpQdyiEEifRto33BfMQbuq9K3fVGK_lIsIVP045CPwq-0p1Sf2DV6P9S9igg7bMwzgroJXA189WRN9kqWk/s1600/rvm.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h4&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;En este tutorial veremos como instalar Ruby 1.9.3 en Ubuntu -en este caso particular usando Ubuntu 12.04-. Haremos uso de RVM que nos servirá para controlar diferentes versiones de Rails.&lt;/span&gt;&lt;/h4&gt;
&lt;h4&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;strong&gt;[ACTUALIZACIÓN] He creado un tutorial mas simplificado, con la nueva versión de RVM, puedes consultarlo &lt;a href=&quot;http://blog.g3ortega.com/2013/05/instalando-ruby-con-rvm-en-5-pasos-o.html&quot; target=&quot;_blank&quot;&gt;aquí&lt;/a&gt;.&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;strong&gt;En resumen:&lt;/strong&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Actualizaremos los repositorios del sistema&lt;/li&gt;
&lt;li&gt;Instalaremos git, curl, rvm.&lt;/li&gt;
&lt;li&gt;Instalaremos los paquetes requeridos&lt;/li&gt;
&lt;/ul&gt;
&lt;strong&gt;1. Actualizar repositorios del sistema.&lt;/strong&gt;
&lt;br /&gt;
&lt;pre lang=&quot;bash&quot;&gt;sudo apt-get update&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot;&gt;&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot;&gt;&lt;/pre&gt;
&lt;strong&gt;2. Instalar git.&lt;/strong&gt;
&lt;br /&gt;
&lt;pre lang=&quot;bash&quot;&gt;&amp;nbsp;sudo apt-get install git&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot;&gt;&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot;&gt;&lt;/pre&gt;
&lt;strong&gt;3. Instalar curl&lt;/strong&gt;
&lt;br /&gt;
&lt;pre lang=&quot;bash&quot;&gt;sudo apt-get install curl&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot;&gt;&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot;&gt;&lt;/pre&gt;
&lt;strong&gt;4. Instalar RVM&lt;/strong&gt;
&lt;br /&gt;
&lt;pre lang=&quot;bash&quot;&gt;curl -L get.rvm.io | bash -s stable&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot;&gt;&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot;&gt;&lt;/pre&gt;
&lt;strong&gt;5. Agregar fuente, para comenzar a usar RVM&lt;/strong&gt;

Para esto ejecutamos el siguiente comando:
&lt;br /&gt;
&lt;pre lang=&quot;bash&quot;&gt;source ~/.rvm/scripts/rvm&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot;&gt;&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot;&gt;&lt;/pre&gt;
&lt;strong&gt;6. Revisar los paquetes requeridos&lt;/strong&gt;
&lt;br /&gt;
&lt;pre lang=&quot;bash&quot;&gt;rvm requirements&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot;&gt;&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot;&gt;&lt;/pre&gt;
&lt;div lang=&quot;bash&quot;&gt;
RVM necesita de algunos paquetes que servirán para ejecutar correctamente Ruby, y por ende Rails.&lt;/div&gt;
&lt;div lang=&quot;bash&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href=&quot;http://gerardortega.com/wp-content/uploads/2012/06/requerimientos-rvm.png&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;wp-image-147 &quot; height=&quot;376&quot; src=&quot;http://gerardortega.com/wp-content/uploads/2012/06/requerimientos-rvm.png&quot; title=&quot;requerimientos rvm&quot; width=&quot;582&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Dependencias&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&amp;nbsp;A continuación copiamos y ejecutamos algo similar a ésto:&lt;/div&gt;
&lt;pre lang=&quot;bash&quot;&gt;sudo apt-get -y install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion&lt;/pre&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;strong&gt;7. Instalar el Javascript runtime&lt;/strong&gt;
&lt;br /&gt;
&lt;pre lang=&quot;bash&quot;&gt;sudo apt-get install nodejs&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot;&gt;&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot;&gt;&lt;/pre&gt;
&lt;strong&gt;8. Instalar Ruby&lt;/strong&gt;
&lt;br /&gt;
&lt;pre lang=&quot;bash&quot;&gt;rvm install 1.9.3&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot;&gt;&lt;/pre&gt;
&lt;div lang=&quot;bash&quot;&gt;
Antes de proceder con la instalación se nos mostrarán algunas dependencias, de las cuales hablabamos en el paso 6, simplemente presionamos ENTER y al final presionamos &quot;q&quot; para salir y continuar con la instalación de Ruby.&lt;/div&gt;
&lt;div lang=&quot;bash&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href=&quot;http://gerardortega.com/wp-content/uploads/2012/06/instalando-rubt-con-rvm.png&quot;&gt;&lt;img alt=&quot;&quot; class=&quot; wp-image-154 &quot; height=&quot;369&quot; src=&quot;http://gerardortega.com/wp-content/uploads/2012/06/instalando-rubt-con-rvm.png&quot; title=&quot;instalando rubt con rvm&quot; width=&quot;582&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Instalando Ruby 1.9.3[/caption]

&lt;strong&gt;Establecer Ruby 1.9.3 como la versión por defecto&lt;/strong&gt;
&lt;br /&gt;
&lt;pre lang=&quot;bash&quot;&gt;rvm use 1.9.3 --default&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot;&gt;&lt;/pre&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/8522507207564472675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7171548331369560991/posts/default/8522507207564472675'/><link rel='alternate' type='text/html' href='http://blog.g3ortega.com/2012/07/instalando-ruby-en-linux-ubuntu-1204.html' title='Instalando Ruby en Linux - Ubuntu 12.04'/><author><name>Gerardo Ortega</name><uri>http://www.blogger.com/profile/00465717261702213771</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSpPte6fybHgf1BO7Wa3HurCFfnNqt76D-2upY2vcnfwHivauSX8QeyA4JS-lpQdyiEEifRto33BfMQbuq9K3fVGK_lIsIVP045CPwq-0p1Sf2DV6P9S9igg7bMwzgroJXA189WRN9kqWk/s72-c/rvm.jpg" height="72" width="72"/></entry></feed>