Ask A Question

Notifications

You’re not receiving notifications from this thread.

Setup Ubuntu 14.04 Trusty Tahr Discussion

Chris Oliver asked in General

I am try to execute this comand

cat ~/.ssh/id_rsa.pub and got the following
grim@Reaper:~/.ssh$ cat ~/.ssh/id_rsa.pub
cat: /home/grim/.ssh/id_rsa.pub: No such file or directory

Then I switched it to the RSA key I made and got the same thing

grim@Reaper:~$ cat ~/.ssh/gitRSAkey.pub
cat: /home/grim/.ssh/gitRSAkey.pub: No such file or directory

Reply

Thanks for the great step-by-step. It's been a long time since I used unix/linux, and the world has become much more complex. I instzalled on a new, clean Ubuntu 14.04 and had no problems at all.

Reply

Please delete this comment, I found the solution

Reply
Ganesh Mohan Ganesh Mohan

I am running ubuntu 12.04 LTS. Will these procedures work on it as well??

Reply

The package names have probably changed a bit. You may want to switch to the 13.04 version as it probably has some more similar package versions.

Reply

Thanks for the great writeup! I have put this entire process into a shell script to run during vagrant provisioning, and here were a couple of gotchas related to the rbenv install, for those taking this path. This was using the "ubuntu/trusty64” vagrant box (Ubuntu 14.04).

1) In your Vagrantfile, in the config.vm.provision line that calls the script, add the "privileged: false" option at the end, so that it runs as the vagrant user, not sudo. Otherwise the PATH updates (e.g. rbenv) will go into the wrong .bashrc file and the script won't be able to find rbenv later. (Or I guess you could specify that the PATH updates go to /home/vagrant/.bashrc).

2) The "exec $SHELL" commands will cause the script to terminate. I tried a number of solutions to get the PATH updates to take effect, as described in this StackOverflow thread (http://stackoverflow.com/qu..., but eventually the only solution that worked for me was to comment those out and use the full path to rbenv and gem.

Thus I replaced these lines:
rbenv install 2.1.2
rbenv global 2.1.2
gem install rails -v "=4.1.5"
rbenv rehash

With these:
~/.rbenv/bin/rbenv install 2.1.2
~/.rbenv/bin/rbenv global 2.1.2
~/.rbenv/shims/gem install rails -v "=4.1.5"
~/.rbenv/bin/rbenv rehash

Reply

"You want to copy and paste the output of the following command and paste it here.

cat ~/.ssh/id_rsa.pub"

cat: /home/usr/.ssh/id_rsa.pub: No such file or directory

Got it. Now to figure out the extent of my pebkac.

Reply

ssh wasn't adding my identity correctly. fixed by manually doing it

ssh-keygen -q -t rsa -N 'password' -C 'email' -f ~/.ssh/id_rsa
ssh-add

Reply
Afonso Praça Afonso Praça

Excelent!

Reply

Well thanks a lot .... installed beautifully .......... for a beginner in ruby on rails ... took me a while to figure this out ...........

Reply

Thanks, so amazing ;)

Reply
Phuong Thi Tran Phuong Thi Tran

The newest ruby 2.1.3 released. How can i update using rbenv?

Reply
Fernando Pineda Fernando Pineda

Very thanks, it is the best getting started that i have seen...

Reply

Thanks a lot!

Reply

I had problems with add-apt-repository. Seems like the dependency might need to be software-properties-common (not sure)

Reply

Greaat!!! Worked smoothly!

Reply

excellent excellent: one of the best written instructions set i have ever ever seen on the interent. and i've been to a lot of forums and read a lot of things, esp coming as a ubuntu user learning this thing: but where or where dear friend is the config/database.yml file located? it's really the only thing that is missing........999.999/1000 almost perfect almost full marks

Reply

ok i have found it. the config/database.yml file is located at ~/myapp/config/database.yml (of course the tilde "~" denotes the home directory) it's easy once you know but if u dont' know it is a big headache!

Reply

Ah yep! Pretty much anytime someone (like myself) mentions a file without giving a full path, they mean inside your Rails app's directory like that.

Reply
Renos Zannettos Renos Zannettos

I followed the guide and got n error at "ssh -T git@github.com". Before this step you need to makean "ssh-add" to add the generated key

Reply

So... this all worked great... until I opened a new terminal and it didn't know where to find rails until I manually typed exec $SHELL in there again. How to make this automatically work?

Reply

That's what will happen if you missed the echo lines to write that code into your ~/.bashrc file. Without those lines, it won't load your ruby environment so they're important!

Reply

Chris, great information, i was able to install smoothly. i am on amazon AWS ubuntu instance, after creating the app, from my desktop browser, testing localhost:3000 did not work, i tried using ip address of the server and also dns name, http, https, no luck, any idea, how i can test this? Thanks for great instructions

Reply

If you set this up remotely, you need to manually run the rails server in an SSH connection and then visit the server IP with the port of 3000. So http://SERVER_IP:3000

A better thing to follow for AWS is the deploy tutorial where your Rails apps are hosted on something remote like AWS or Digital Ocean. It uses Nginx & Passenger so that your Rails apps are always running.

Reply

Excellent guide. Worked flawlessly. Thank you!

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.