Martin Heller
Contributing Writer

Installing Rails 2.0 on Windows XP

analysis
Dec 10, 20072 mins

In response to Friday's news story that Ruby on Rails 2.0 had been released, I decided that it was time to update my installation. I opened a C-Shell on the Windows box I use for Rails development, typed "gem update", and promptly ran into trouble. I'm not sure why, but some of the updates failed. Maybe it's because the different packages that make up Rails all list each other as dependencies. I tried again with

I decided to start fresh, so I downloaded the latest version of the Ruby One-Click Installer from RubyForge, uninstalled my old Ruby version (1.8.5, which should have been good enough for Rails 2.0), and installed the new version, 1.8.6. I opened a C-Shell, typed “gem install rails –include-dependencies”, and was told that no “gem” application was found.

Gems was part of the One-Click Installer, but I downloaded the latest Ruby Gems package from RubyForge anyway, unpacked it, and ran setup.rb. It removed the version that was part of the One-Click Installer, which was one revision back, and installed itself.

I opened a C-Shell, scrolled up to “gem install rails –include-dependencies”, and was again told that no “gem” application was found. I tried the All Programs|Ruby-186-26|RubyGems|RubyGems Package Manager menu item, and got the Gems quick help, so Gems was there. I tried “gem install rails –include-dependencies” yet again, and yet again was told it wasn’t there. By this point I was starting to suspect a path issue, so I tried “c:rubybingem” instead of “gem”. This started to run, but failed to perform the installation.

I opened My Computer|Properties, went to the Advanced tab, opened the Environment Variables box, and checked the two Path variables. As I suspected by that time, Ruby wasn’t there: the uninstall had removed it, and the reinstall had not added it back. I added “;c:rubybin” to the end of my User path, closed the dialog, and once again opened a C-Shell. Finally Rails installed properly, at version 2.0.1. While I was thinking about it, I also installed the Rake Gem.

Nothing is ever easy.

Martin Heller

Martin Heller is a contributing writer at InfoWorld. Formerly a web and Windows programming consultant, he developed databases, software, and websites from his office in Andover, Massachusetts, from 1986 to 2010. From 2010 to August of 2012, Martin was vice president of technology and education at Alpha Software. From March 2013 to January 2014, he was chairman of Tubifi, maker of a cloud-based video editor, having previously served as CEO.

Martin is the author or co-author of nearly a dozen PC software packages and half a dozen Web applications. He is also the author of several books on Windows programming. As a consultant, Martin has worked with companies of all sizes to design, develop, improve, and/or debug Windows, web, and database applications, and has performed strategic business consulting for high-tech corporations ranging from tiny to Fortune 100 and from local to multinational.

Martin’s specialties include programming languages C++, Python, C#, JavaScript, and SQL, and databases PostgreSQL, MySQL, Microsoft SQL Server, Oracle Database, Google Cloud Spanner, CockroachDB, MongoDB, Cassandra, and Couchbase. He writes about software development, data management, analytics, AI, and machine learning, contributing technology analyses, explainers, how-to articles, and hands-on reviews of software development tools, data platforms, AI models, machine learning libraries, and much more.

More from this author