Posts tagged with "git"

grok grack

Recently I was trying to host git repository from an already existing(non-bare) repository. I
was looking for a solution that does not force me to create a bare repository and does not
require me to install apache or some such webserver on my machine.

I found a wonderful tool written by Scott Chacon called grack. grack is a git server on top of rack. Its elegance is in its design. It consists of few hundred lines of a rack middleware(awesome!) and a 6-8 line config file that allows you to host any repository over http. Setting it up on a local
machine was really easy. Even hosting multiple repositories is trivial.

I discovered one quirk when my server was not accessible, was due to binding it specifically to 127.0.0.1.
Avoid this and bind to the hostname instead.

Many thanks to Scott Chacon, Github, Rack and Ruby for keeping it so simple.

Boost your BASH - and never again work with a plain shell

Over the past few months I have been using a community version of bash_profile, bash_login, emacs settings and such. It started when Muness shared his bash_vcs(which was pimped command prompt) and I was hooked. I noticed a few projects that were sharing similar shell settings and enhancements. Forking from Toby’s dotfiles I started enhancing my experience on every machine I worked. This not only lead me to have a better understanding how different flavours of Unix work and also helped me automate a lot of my day to day activities.

Allow me to introduce the dotfiles project which comes with all those enhancements – stolen and tweaked from many sources – and with valuable help from Patrick Turley .
Recent additions include bash_boost and what could be called the beginnings of a javavm(inspired by rvm for ruby.)
Now with more brainpower behind dotfiles we hope to add more features fast. Next steps include adding support for zsh.

Give it a try, fork it or point us to more stuff we can steal to improve it for you.

no such file to load --rubygems

While working on my mac and trying to use giternal I ran into ‘no such file to load —rubygems’. While I had been using ruby apps on the machine for a while, without any issues and with all the installed gems, this seemed weird.

I tried using the irb and check if

irb> require ‘rubygems’

would work. But I got the same error. I was using the default mac version of the ruby installation that is installed at ‘/System/Library/Frameworks/Ruby.framework…..’ and did verify that rubygems was installed and that rubygems.rb was also present.

On further investigation I found that the default ruby that was run on the command line was 1.8.7 when I expected 1.8.6.
It appears that my path contained ‘/opt/local/bin’ before ‘/usr/bin’ which made the 1.8.7 version of ruby default and thus clobbered all by 1.8.6 settings and lost rubygems.

To fix this I moved ‘opt/local/bin’ to be after ‘/usr/bin’ in my $PATH and voila everything works again.

I have also been meaning to try RVM – maybe its time to give it a shot since my personal projects are on 1.8.7 and I have jruby as well as 1.8.6 installed on my mac.

Learn Git

One big repository and one big repository on learning it all about git.

Now you can’t say you do not know enough not to try it.

“May the Git be with you!”