Modern rails development uses postgres >= 9.1, which many versions of Ubuntu won't install with this command. 

http://www.postgresql.org/download/linux/ubuntu/