Purge annoying packages from Ubuntu
Sep 10, 14 by Juan Lebrijo about Ubuntu, blog
Sometimes you need to remove a package from your System, this is the way. First discover the packages which are bothering you:
dpkg -l | grep ruby
Once you catched them, purge them from the system (removing binaries and configuration files):
sudo dpkg -P libruby1.8
Ruby on Rails
Sep 05, 14 by Juan Lebrijo about

Dev

Ops

Design

  • UX - User eXperience
    • UX-Apprentice
    • Balsamiq: Mockups, linked together and export to PDF

Testing

Java

Install PostgreSQL on Ubuntu for Rails developers
Aug 29, 14 by Juan Lebrijo about postgresql, ruby on rails, blog
These instructions worked for Ubuntu 12-14. Check the language in the system:
env | grep LC_
It should be "en_US.UTF-8", if not you can configure in "System Setting > Language Support". Installing DDBB and libpq-dev to compile rails gem when bundling, with following command:
sudo apt-get install postgresql libpq-dev
To gain access from the server it-self, In /etc/postgresql/9.3/main/postgresql.conf, uncomment the following line:
listen_addresses = 'localhost'
To have access from rails app, modify the following line in /etc/postgresql/9.1/main/pg_hba.conf:
# "local" is for Unix domain socket connections only
local   all             all                                     md5
Restart the service:
sudo service postgresql restart
You will need to add a role:
sudo -u postgres psql
create role pg_user with createdb login password 'pg_user';
Be sure that your Gemfile includes: gem 'pg' Create your database.yml for dev and test:
common: &common
  adapter: postgresql
  username: pg_user
  password: pg_user

development:
  <
Create and fill the database:
rake db:create
rake db:migrate
rake db:seed
Some Postgre useful commands are:
  • List of databases: sudo -u postgres psql -l
  • Check server encoding: sudo -u postgres psql -c "SHOW SERVER_ENCODING"