Ask A Question

Notifications

You’re not receiving notifications from this thread.

Setup Ubuntu 14.04 Trusty Tahr Discussion

Chris Oliver asked in General
Toni Češarek Toni Češarek

thnx

Reply

I am new so please don't be harsh. I want to learn Ruby on Rails and I was told that I should install it on Ubuntu so I downloaded Ubunto 14.04 LTS (the desktop version). That is great! Now I wanted to install Ruby on Rails. I did a search and found your website. I am afraid I am lost at: The first step is to install some dependencies for Ruby. Where do I enter command lines? I can't even find help on Ubunto LOL. I am a Windows vet and trying to convert but for now I am lost for a monent and would appreciate your help. Thanks so much.

Reply

No worries! There is a application called Terminal that you want to type these commands in. Open up that and type them in there and you should be fine.

Reply

Thank you. The terminal app worked perfectly. Just a note that with Ubuntu 14.04 I was getting an error message stating they could not verify the authenticity of the host github.com after creating my key but gave me the option to add it permanently. When I ran the command line to verify my key I got the message

Warning: Permanently added the RSA host key for IP address '192.30.252.130' to the list of known hosts.
Hi Msjay2u! You've successfully authenticated, but GitHub does not provide shell access.

The next time I ran it to verify I just got the success message without the warning line.

Seems there is a problem with their DNSSEC (Domain Name System Security Extensions)

Reply

That error/warning is just to make sure you know you're connecting to a computer that you've never talked to before. Glad everything is working well!

Reply

Instead of
sudo sh -c "echo 'deb http://apt.postgresql.org/p... precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
use
sudo add-apt-repository 'deb http://apt.postgresql.org/p... precise-pgdg main'

Reply

Much cleaner, thanks!

Reply

You need python-software-properties installed to use add-apt-repository.

Reply

Great article thanks! I seem to be unable to install other versions of Ruby. For example, if I cd into a directory and try to install Ruby 2.0.0-p247 I get an error on compile. Is this due to the deadline issues going around? Anyone know how to fix this? I tried to install using the patch as noted above, but that did't work either.

Reply

You can run the following command if you'd like to install Ruby 2.0.0-p451 instead of 2.1.1:

curl -fsSL https://gist.github.com/LeonB/10503374/raw | rbenv install --patch 2.0.0-p451

It requires a different patch than 2.1.1 does.

Reply

why not use PostgreSQL 9.3 from the Trusty Thar repo?

Reply

You're right, I'll switch it over to the Trusty repo. Eventually when PostgreSQL's official repo is available for trusty I'll switch it back because you're always guaranteed to get the latest version on their repo. The Ubuntu repositories tend to lag behind the official releases so I lean towards using the postgres provided ones if I can.

Reply
Ed Halferty Ed Halferty

Installing from source can cause frustration down the road when you need to work on a project written with a different ruby version. Usually the changes needed to get it working on a different ruby version are minimal, but working with other people who have conflicting ruby versions becomes difficult if you're back- or forward-porting code. But on a production environment, or a box that will only be used for personal ruby projects, it's sometimes nice to know that your ruby is installed in the simplest way possible - directly in the path.

Reply

How about adding a few steps to setup an app server like unicorn passenger or puma? That would be great

Reply

Good idea, but those are more for production environments. The Deploy Rails tutorial is more geared for setting up a server and covers Nginx + Passenger. This tutorial is for your development environment.

Reply
Eugene Fidelin Eugene Fidelin

Fix download url to "ftp://ftp.ruby-lang.org/pub..."

Reply

Got it, thanks!

Reply
Eugene Fidelin Eugene Fidelin

Please mention common compile fail because of "readline error" and this patch that fixes it https://github.com/sstephen...

Reply

This is fixed now in the latest versions of 2.1 and 2.0 that were released yesterday!

Reply

Excelente, me sirvió mucho. Saludos

Reply

HI i got this error while installing ruby with rvm on 14.04

Partial file(18). Only a part of the file was transferred. Removing partial and re-trying.
rvm installed successfully.
rvm requirements is passed

Reply

Sounds like the download got interrupted. You probably should delete the file they mention (assuming they tell you which one didn't finish) and try again.

Reply

Thanks! Went well. One suggestion, SQLite!

Reply

You should have sqlite3 installed if you followed all the steps. And to generate a Rails app with Sqlite, just skip the -d option and use rails new myapp

I'll add a comment to the last part to make that more clear. Thanks!

Reply
Fernando Paladini Fernando Paladini

Awesome tutorial, thanks!!

Reply

Hi for `add-apt-repository` command I think what you need is "software-properties-common" package instead of the python stuff, see: https://askubuntu.com/quest...

Reply

Hi Chris,
Great article. I was able to follow the steps untill MySQL installation, after that I created an app,
$rails new myapp -d mysql
And was shown the following error,
Fetching gem metadata from https://rubygems.org/...........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...

Gem::RemoteFetcher::UnknownHostError: no such name (https://rubygems.org/gems/r...
An error occurred while installing rake (10.3.2), and Bundler cannot continue.
Make sure that `gem install rake -v '10.3.2'` succeeds before bundling.
run bundle exec spring binstub --all
bundler: command not found: spring
Install missing gem executables with `bundle install`

Please help me out. I did a "bundle install" but it just said "Unknown Host name"

Reply

Sounds like you had internet connectivity problems. Try running it again and see if it works next time?

Reply
Rana Muhammad Waqas Rana Muhammad Waqas

I did the setup but how do I start building application, I am new to ruby on rails

Reply

Hello,
I am new to Rails: How can update my config/database.yml file to match the database username and password.

Reply

You can just open that file in your favorite text editor and set the username and password keys inside it. I'd recommend using Sublime Text or something similar to do that.

Reply
Mark Evans Mark Evans

Awesome post! Made installation a breeze. Thank you.

Reply

Great tutor :D
Can I prepare my RoR project in offline mode? without internet connection.
Thanks

Reply

If you've already downloaded all the gems and ruby versions, you can work offline but if you need to install anything new, you'll need an internet connection.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,946+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.