Archives for ruby

A problem I ran across

I was chasing links concerning the lack of tail recursion optimization in ruby and ran across a math problem:
Find the smallest positive integer n such that n % x = x-1 for x from 2 to 18
i.e. The remainder is one less than the divisor for all integral divisors from 2 to 18.

The [...]

installing gem on ubuntu ibex

Installing ruby and gem on Ubuntu (Intrepid Ibex) is somewhat problematic because of differences of opinion between the apt folk and the gem folk. If you want a working version of gem on Ubuntu Ibex, the RailsOnUbuntu site has the instructions. Worked for me.

Installing Ruby on Ubuntu Hardy

The great thing about Ubuntu and other Debian derivatives is the apt package system. Most of the time apt makes installing, deleting, or updating software trivially easy. In rare cases, appropriate apt packages are not available, or the packages are not quite correct. I ran into one of those cases trying to install Ruby [...]