Rails port/Windows

From OpenStreetMap Wiki
Jump to: navigation, search

The following are specific instructions for installling Ruby on Rails... on windows, as part of the process of getting the Rails Port OSM server code up and running.

Contents

Basic Ruby Install

Download Ruby from http://rubyforge.org/frs/?group_id=167 You want the installer exe for the latest stable version ("1.8.6-26 Final Release" at time of writing)


Run the installer exe. Accept all defaults. Don't install ruby under 'Program files'. This may cause problems due to spaces in the file path. Initially this uses 76MB of disk space. The installer possibly requires administrator privileges (anyone tried without?)

You should now be able to do 'gem' commands to install other bits onto ruby, including rails. Open a command window and run the gem commmands described here: The Rails Port#Gems (libraries)


Installation Troubleshooting

LibXML

There is a standard ruby installer for Windows, but the libxml library is not officially supported on Windows, another one of those annoying Win32 build issues. However, there is a binary build of the libxml shared library, available at http://cfis.savagexi.com/articles/2007/02/09/ruby-libxml-and-windows. First install ruby, then copy the shared object into the folder mentioned in the documentation. You will further need to change all occurrences of 'require xml/libxml' to require xml/libxml_so' due to the name of the exported routine in the libxml_so.dll, renaming the library will not do. You will also need the libxml2.dll which you can get from http://www.zlatkovic.com/libxml.en.html.

UPDATE: Looks like libxml is now supported on Windows (http://cfis.savagexi.com/2008/07/16/resurrecting-libxml-ruby). Its works with the last Ruby release, 1.8.6-27 rc2. This release make easy to install all ruby librairies.


RMagick

RMagick has a bundled installer that also provides imagemagick at http://rubyforge.org/projects/rmagick.

MySQL

Apparently you will not need to compile the quadtile mysql function for a new installation.

For the installation of rails and mysql use the official installers. MySql 5.1.22 did at the time of writing not seem to work due to some code generation issues in rails, Mysql 5.0.44 community edition worked. This might not be specific to Windows.

Personal tools
Namespaces
Variants
Actions
site
Toolbox