ruby.exe Unable To Locate Component readline.dll 1

Posted by mike on August 30, 2008

I just installed ruby 1.8.7 on a Windows machine and when I started IRB:

readlineError

The fix:

  1. Go to http://gnuwin32.sourceforge.net/packages/readline.htm and download the binaries zip file.
  2. Unzip the file.
  3. Change directory to the new directory created by unzipping the file.
  4. Change directory to the bin directory.
  5. Copy the readline5.dll file.
  6. Change directory to your ruby/bin directory (for me this is C:\ruby\bin).
  7. Paste readline5.dll file there.
  8. 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.

LIBMYSQL.dll was not found 2

Posted by mike on June 23, 2008

I recently upgraded my laptop to 4 Gigs of RAM and needed to upgrade Windows to the 64 bit version in order to utilize it. After installing everything and getting it all setup, I needed to do some work on an existing Rails application.  I pull it out of my Subversion repository, create the dev and test databases, and run ‘rake db:migrate’ only to get this message:

MySQL_Error

I’m pretty confident that MySQL is installed correctly and I have the databases and permissions setup correctly.  A quick Google search tells me that others have experienced the same issue and they were able to resolve it by finding the dll and copying it to the ruby/bin directory. So…

copy "C:\Program Files\MySQL\MySQL Server 5.0\bin\libmySQL.dll" C:\ruby\bin\

OK, fire up rake again and I get the same error. Back to Google again and after a bit more digging I find that there is an issue with Ruby support in the 64 bit version of MySQL. So I head back to the MySQL website and download the 32 bit zip version without the installer. Open it, navigate to the bin directory and copy libmysql.dll to the ruby/bin directory. This has taken care of the issue and I haven’t had any problems working with the 64 bit version of MySQL using the 32 bit library in Ruby.

Setting up Windows to access Subversion over SSH

Posted by mike on February 28, 2008

I will try to cover the steps involved in setting up Windows with a Subversion client that will access over ssh.

Tools needed:

  • Tortoise
  • PuTTY
  • PuTTYgen
  • Pageant
  • WinSCP

I will assume that you have some knowledge of logging in to the remote Linux machine and that you have Subversion and ssh already working.

The following steps need to be done from the command prompt on the Linux machine that is running your Subversion repository. You need to be logged in as the user you want to access the repository with. For this tutorial, I’ll use the username huckleberry. You should not be logged in as root.

  1. Execute the command ’ssh-keygen -f akey’
  2. When prompted, type the passphrase that you want to use to log in. (This can be left blank, but I don’t recommend it)
  3. Type ‘mkdir .ssh’ (If you get an error that the directory already exists, just go to the next step)
  4. Type ‘cat akey.pub >> .ssh/authorized_keys’
  5. Type ‘chmod 600 .ssh/authorized_keys’

These next steps need to be done on the Windows machine that you are setting up access for:

  1. Open PuTTY
  2. Enter the hostname or IP address of your Subversion server, verify the connection type is set to SSH, and enter a name to call your new session in the ‘Saved Sessions’ textbox. I’ll call mine mysvn.
  3. Click the Save button
  4. You should now be able to use the open button to open a session to your Subversion server.
  5. Next you need to copy the private key to your machine. I use WinSCP to secure copy the file ‘akey’ to my desktop.
  6. Start PuTTYgen and choose Conversions from the menu bar, then Import key.
  7. Type the passphrase you assigned the key when you created it on the Linux box.
  8. Click the ‘Save private key’ button
  9. Choose an appropriate location to store your key and save it naming it something like akey.ppk
  10. Start Pageant, it will bring up a little computer with a hat icon in your status bar, next to your system clock
  11. Right click the icon and choose Add key
  12. Find your newly saved key (akey.ppk) and choose Open
  13. Type your passphrase
  14. Assuming you have installed Tortoise, bring up something like your Documents directory
  15. Right click in the file pane (not sure if that’s what it’s really called, but folders are in the left pane and files are in the right one) and choose TortoiseSVN/Repo-browser
  16. For the URL you will use svn+ssh://huckleberry@mysvn/var/svn/myProject (replace /var/svn/myProject with the path to the repository you want to access)
  17. You should be able to browse the files in your repository

That’s it! You should now be able to checkout, commit, etc. using a URL path like the one above. When you reboot, or shutdown Pageant you will need to start it again and add your key back.

I recommend that you go back to your shell and delete the private key that you generated.

.NET 3.5 Failed to Install on Vista x64

Posted by mike on February 10, 2008

I came across an issue while rebuilding my computer and trying to install Visual Studio 2008. I did all of the Windows updates before starting to install any software, which seems to have been the cause for this issue. When I started the Visual Studio installer, it got to where it installs the .NET 3.5 framework and eventually throws an error. After searching the Internet I found others that had the same issue. It seems to be related to a critical update for Vista, KB110806. It’s apparently a fix for .NET 2.0 that MSDN lists as being a component of .NET 3.5.

Anyway, here is what I did to get around it:

  1. Go to Windows Update
  2. Choose Change settings from the list on the left
  3. Set to "Download updates but let me choose whether to install them"
  4. Click OK
  5. Go to Control Panel
  6. Choose "Uninstall a program" under Programs
  7. Choose "View installed updates" from list on the left
  8. Find KB110806 in list, click, and choose Uninstall
  9. Reboot

The first time I tried this, I neglected steps 1 - 4 and Vista managed to reinstall the update immediately after I removed it.

At this point I downloaded and installed the .NET 3.5 framework. After that Visual Studio 2008 installed without any further issues. You may want to go back and look at steps 1 - 4 if you want to turn auto updates back on.