leads to a 404. What happened here?
For this course, GitHub is used as a central repository for exercise submissions. Each course participant will create an account on GitHub, fork (i.e., copy) the course repository, modify the skeleton files to complete assignments, and push the completed work back up to GitHub for all to see and review.
git is a distributed version control system. Version control systems are an important toolkit in a developer's arsenal: they allow developers to track changes to their code over time and operate well in a team. Developers usually commit small changes as they complete features, creating revisions that are archived and never lost.
git is the most popular version control system used with Ruby at this time.
git does not have the gentlest learning curve, but the basic functions are pretty straightforward and well documented.
Reading Assignment: Learn more about git by reading Pro Git - Git Basics.
Reading Assignment: After you've learned about git at a high level, setup git on your local machine by following the instructions on GitHub for your platform. Follow the entire guide, including setting up SSH keys.
Alternatives to installing GIt:
Its great that technology makes life eaiser for us, but its better to know how the internals of a system works. For those less adventurous here are some other ways of interacting with git and github.
Reading Assignment: Read the GitHub guide to forking a repository.
I'd like the course to introduce people to the command line, since ruby and rails both use it heavily. Also being comfortable in the command line gives people confidence in other areas of software development.
Thanks, I'll add it to the course materials.
I'm just having you all as students understand some basic git commands with this challenge, and understand basic parts of github.
The use of github repos will allow me to read over your work and provide help where needed. If that answers your question.
Ok, here is how you will copy your repo localy
$ git clone email@example.com:Frankly3D/LearnRuby.git
You won't have to set up a remote because cloning, automatically creates it. Then all you have to do is follow this workflow
$ git add <fllename>
$ git add .
. is all files that have been changed/added to the repo
$ git commit -m "your message here" $ git push origin master
You won't have to worry about using upstream, upstream is used when say your working from two different machines, or you have collaboraters on a project and there are changes to the remote repo git fetch upstream will pull in those changes for you without merging.
The error seems to be telling you that github can't find your public keys:
So try this: http://help.github.com/mac-set-up-git/
If this is the only identity you have (i.e. only one github account) you can simply follow along. If you have something more involved we might need to talk about your ssh setup.
Shoot a message when you have worked through those steps (you only have to do it once)...unless this happens again.
Did you run this command at your prompt?
ssh-keygen -t rsa -C "firstname.lastname@example.org"
Just want to make sure your didn't put any extra words/characters in there
Also it seems your running Lion OS X
run echo $PATH in terminal and let me know the response.
Thanks for reply. See below:
Peters-MacBook-Air:.ssh hwangpet$ ssh-keygen -t rsa -C "email@example.com"
-bash: ssh-keygen: command not found
Peters-MacBook-Air:.ssh hwangpet$ echo $PATH
Did you install xCode 4? I am not a Mac user, but this thread seems to be relevant: http://stackoverflow.com/questions/5364340/does-xcode-4-install-git.
Perhaps since xCode appears to install git it simply can't find the path you can tell it to like this post suggest: http://stackoverflow.com/questions/5545715/how-do-i-add-usr-local-git-bin-to-the-path-on-mac-osx
Keep plugging away man!
Here the result after running echo $PATH in terminal:
wifi-dhcp-55-168:~ hwangpet$ echo $PATH
Thanks again for all the help fellas! I'm going to work with one of my developers today who already use github so hopefully they can point me in the right direction.
It looks like your missing some necessary binarys in your PATH variable
these basic path settings should be in your .bash_profile like so
Not sure where your Xcode is, but your developers should understand the situation
Andre - you were correct. My .bash_profile was corrupted. My echo $PATH looks normal now:
wifi-dhcp-55-168:Users hwangpet$ echo $PATH
Thanks alot everyone!
This one is a bit tricky with all the diferent steps between installing git, setting up the account and the ssh keys so that the installed Git on your machine can talk to your Github account.
From what I can remember, to install RVM it also requires you to have Git installed on your machine for some reason. This might help poeple having trouble installing RVM.
I'm glad Peter is up and running. I remember having allot of the same issues trying to the different bits a pieces put together myself. I see that Peter has in his bash_profile:
I was wondering how does this actaully work? My understanding so far is that when you call a program to perform an action in the command line, for example "rails server", "mysql -u root" or "git init", the comand line looks for the named program in the directories mentioned in the bash_profile file. Am I right? Could someone clarify?
Again, another aussumption is that, for programs to talk to each other on a host they need to know where each other exist on the hard disk. If I have a rails app that needs to resize an image, how does the rails app know where ImageMagick is? Do the diferent applications use the bash_profile as a directory to find each other?
Also, How does the syntax of the bash_profile files or shell script work interms of tying libraries and applications together?
Where does RubyGems and Bundler fit into this whole thing?
Obviously this kind of stuff plays an important part in your development enviornment but it's plays a massive role in delievering code. Interms of depoying ruby applications to the web it's important to have a solid handle on how to setup Linux boxes. It would be great to get pointers to goood resourses on more learning for this kind of stuff.
Hey Mark, excellent question!
The string you see when you use echo $PATH in terminal is a result of a UNIX variable. It tells terminal where to find the binarys necessary to execute programs the " : " is a delimiter that lets you specify multiple paths to where your binaries are located in the file system.
How Ruby knows where to find stuff because when ruby is built for your particular machine, it has predefined directories to hold libraries. Where these reside all depends on the machine you are using. So an Ubuntu OS Ruby location may be different from a Windows OS Ruby location, or when you install RVM the Ruby location is different and so on.
If you run this command in terminal
ruby -e 'puts $:'
You will receive an output of the directories that Ruby is using.
$: is a Ruby array variable of places to search for loaded files.
As for Rubygems, it is a standardized packging and installation framework for Ruby libraries and apps. Thus making it easier to install, upgrade, and locate Ruby packages. Keeping lots of Ruby developers including myself sane.
Rubygems handles all the dependencies, and version control of gems to install on your system.
Bundler is sort of an extension for Rubygems in Ruby applications, using Gemfiles to install and locate gems necessary for your application.
I hope this answers your question, here are some links below to help you further understand.