Posted by mike
on August 30, 2008
I just installed ruby 1.8.7 on a Windows machine and when I started IRB:

The fix:
- Go to http://gnuwin32.sourceforge.net/packages/readline.htm and download the binaries zip file.
- Unzip the file.
- Change directory to the new directory created by unzipping the file.
- Change directory to the bin directory.
- Copy the readline5.dll file.
- Change directory to your ruby/bin directory (for me this is C:\ruby\bin).
- Paste readline5.dll file there.
- Rename file readline.dll.
As long as your ruby\bin directory is set in your PATH environment variable, that should take care of the problem.
Posted by mike
on August 13, 2008
I just went through the process of setting up a new Linux desktop for Rails development. In an effort to keep it short and to the point, I’ve trimmed up some of the info that I found useful from wiki.rubyonrails.org. This is just a basic development stack. I plan to write another post on the editors that I’ve tried and what I’ve found to work best for me so far. Anyway, let’s get started. I tend to work primarily at a command prompt, so that’s the method I’ve described here. Open a terminal window and follow along:
sudo apt-get install ruby rdoc libyaml-ruby libzlib-ruby ri libopenssl-ruby ruby1.8-dev build-essential
You don’t want to install the rubygems package from the Ubuntu repository. It is consistently out of date, so you will need to pull the tarball down from RubyForge:
wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz
tar xvzf rubygems-1.2.0.tgz
cd rubygems-1.2.0
sudo ruby setup.rb
At least with the versions I’ve installed, I had to create a symbolic link to gem1.8:
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
You should now be able to do a gem update:
sudo gem update --system
And install Rails:
sudo gem install rails
Now it’s time to take care of the database installation:
sudo apt-get install mysql-server libsqlite3-0 libsqlite3-dev
sudo gem install mysql sqlite3-ruby
If you want to install RMagick:
sudo apt-get install imagemagick libmagick9-dev
sudo gem install rmagick
That should do it. Now go have some fun!
Posted by mike
on August 10, 2008
I’ve been a fan of Ubuntu Linux since I first started using it a few years ago. One of the first things I do when building a new Ubuntu machine is set the default editor to Vim. I have been using Vi for a long time and the keyboard shortcuts are very natural for me, so the first time I typed a command like visudo or crontab -e and got the Nano editor, I was shocked. With Ubuntu 8.04 it’s really very easy:
Open a terminal window (Applications/Accessories/Terminal)
Type: sudo apt-get install vim-full
That should do it. By default only the vim.tiny package is installed and installing the vim package (apt-get install vim) only gets you vim.basic. Both of those will leave the default editor as Nano. Installing the vim-full package will take care of modifying the default editor for you to be vim.gnome. If you would like to change the setting to something else, or that didn’t work with the version of Debian or Ubuntu that you have, try:
sudo /usr/sbin/update-alternatives --config editor
Then pick the number that corresponds with your choice.