Archive for November, 2008

Ruby Gems on Ubuntu 8.10

Thursday, November 20th, 2008

Today I was setting up ruby, rails and capistrano on Ubuntu 8.10.  It turns out that the gems binary path was not in my path.

To fix it, edit your ~/.bashrc file.
gedit ~/.bashrc

Add these lines to the bottom of the file.
#Export the path for Ruby Gems
export PATH=$PATH:/var/lib/gems/1.8/bin

Save it and then source the file (to save you from logging-out and back in again).
source ~/.bashrc

Then you should be able to run capistrano as you would expect.

Please note: There are potential problems with this as Ruby Gems can install system libraries in this path that end up being used instead of the correct system ones.  This can potentially cause problems.  See Launchpad bug #262063 for a discussion of the issue.

SSH tricks: Forward and Reverse Tunneling for Fun and Profit

Tuesday, November 11th, 2008

SSH or Secure SHell is a protocol for connecting to a remote computer’s shell securely.  Many people use it for just this purpose, but there are several less used, yet extremely useful tricks you can use to get more out of SSH.

In this post, I will cover what forward and reverse tunneling of ports through SSH is.  Why you would want to do it, and how to do it.  Port tunneling is also known as port forwarding.

(more…)