Friday, November 4, 2011

How to Fix Ruby 1.9.3 "It seems your ruby installation is missing psych" Error


If you see this:
/usr/local/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
Latest version currently installed. Aborting.

First do this: 
sudo apt-get install libyaml-dev

Wednesday, August 18, 2010

Installing Ruby 1.9 from Source on Ubuntu in Five Minutes

This is on a clean Ubuntu Lucid Lynx image.
  • sudo apt-get install gcc libzlib-ruby libssl-dev libxslt-dev libxml2-dev libmemcached-dev libsasl2-dev libmemcached-dbg  libpq-dev libcurl4-gnutls-dev libyaml-dev make
  • wget LINK_TO_RUBY_TAR
  • tar -zxvf rubyXXXX.tar.gz
  • cd rubyXXXX
  • ./configure
  • make
  • sudo make install
That's it, try running "ruby -v" to see the ruby version.

I recommend doing the following to enable SSL support (only takes a few seconds):
  • cd ext/openssl
  • ruby extconf.rb
  • make
  • sudo make install
And lastly, update the gem system:


  • sudo gem update --system

Wednesday, July 21, 2010

Git For Noobs - The first few commands you must know to start working on a git project

This is the minimum set of things you need to know to contribute to a git repository.

git clone

This is the first thing you need to do to get the code. Find the git repository URL and then clone it, for example:

git clone http://github.com/appoxy/simple_record


Now you have the code and can start working on it. When you're done with your modifications and tested them, you then need to commit.

git commit

This will commit to your local repository, the keyword being local. And by local, I mean your hard drive, NOT the remote repository that you cloned above. This is different than subversion where a commit will commit to the remote repository.

git commit -am "I just modified some stuff... I'm not a noob anymore!"

Now that's committed to your local repo. Let's get that commit onto the remote repo.

git push

This will take your local commits that you made with git commit and push them up to the remote git repository that you cloned above.

git push

Now your changes are on the remote repository for all to see.

Tuesday, June 8, 2010

Delete a Local Git Branch

Use git push to the remote branch with a colon in front of the name, eg:

git branch -D bigbadbranch


Delete a Remote Git Branch

Use git push to the remote branch with a colon in front of the name, eg:

git push origin :nolongerneededbranch