0

I am new to Ruby and git so please stop me if it seems I am headed in the wrong direction :)

What I was trying to do was install RVM so I can more freely manage my gems. I was doing that according to this tutorial: https://rvm.io

It says there that "To install and/or update the latest code from the github repository ( requires git"

So I started to install git (oh what fun...) and was following this tutorial: https://help.ubuntu.com/community/Git

and there the instructions say that I need to do this:

sudo -H -u gitosis gitosis-init < initialKeyFileName
where initialKeyFileName name is the name of a copy of the public key from your local machine which is on the server (i.e. the file ending in .pub)

So my questions is how do I find this .pub file? Is it on my local computer somewhere or do I need to contact the sys admin? Or is it the ,pub from a repository where I need to download from, which would be a Ruby repo since I was trying to install rails originally.

Seems a bit convoluted, doesn't it? :) Is there a better way to do all this?

3 Answers 3

4

Thats a terrible tutorial! There is no need to install the gitosis package. Uninstall it and just don't bother with that line and you should be fine. Similarly, you should not install apache or the like. Stick with git-core and maybe gitk if you want a UI later down the road for git-stuff. (Not quite sure of the ubuntu package names, as I don't use it)

You can also just download the install file from github, but git is so awesome I wouldn't recommend that.

If you want the latest version of it, you can always do a source install. Just make sure you set some stuff in config.mak to disable features you can find in the Makefile. You basically want to disable everything except OpenSSL. You will need the headers for OpenSSL and zlib.

To uninstall gitosis: sudo apt-get purge gitosis

Sign up to request clarification or add additional context in comments.

2 Comments

I am also kind of new to Ubuntu, so what would be the best way to uninstall it? Thanks for the heads up!
@Genadinik I have edited the command into the answer for you.
2

While not solving your exact problem, the following sets up RVM and a few other libs that you will very likely need down the road using Ruby/Rails:

sudo apt-get -q -y install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libmysqlclient-dev libmysqlclient16 
sudo apt-get -q -y install clang #(for rvm...otherwise rvm gives error on rvm install)
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)

5 Comments

Surely rvm can be configured to use gcc instead of clang? (Never used rvm)
Not sure; I didn't bother with getting into the details, just wanted to get up and running and installing clang fixes things nicely.
I will trust you that those are not viruses ;)
I already accepted @mathepic's answer, so I went through some of your question and upvoted them because your answer here really helped me out. :) Thanks!
No they're not viruses.. check out each lib !
2

Yeah I'd expect that this ought to install git to the satisfaction of rvm:

sudo apt-get -y install git-core

1 Comment

Oh yeah this went through just fine! Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.