Instant Rails

Apr 21, 2008 15:50 GMT  ·  By

Ruby on Rails is a free framework that allows you to create web applications having a database back end. As compared with other frameworks, it does not require a high quantity of source code in order to deploy a certain type of web application, like content management systems, virtual stores, blogs and more. Due to this fact, the development of web applications using Ruby on Rails will take place faster.

If you have found a Ruby on Rails application and wanted to test it on a Windows operating system, you might have noticed that an adequate testing and development environment does not exist by default. The most rapid method to implement support for Ruby on Rails on Windows operating system is provided by Instant Rails.

Instant Rails provides all necessary tools to manage Ruby on Rails applications: Ruby, Rails, Apache, and MySQL. It does not have an installer. After you download the distribution archive and unzip its content in an empty directory on the root of your C: drive, the Instant Rails executable file must be launched (the executable file path must not contain space characters).

In case you upgrade a previous Instant Rails version, you will be allowed to maintain your previous custom settings and databases. If you are dealing with Instant Rails for the first time on your Windows operating system, you must configure the Windows Hosts File to be able to easily open and test the default Ruby on Rails applications that are included in Instant Rails (Cookbook and Typo): right click on the application icon situated on taskbar and select Configure-Windows Host Files. For example, by adding the next line in the hosts file:

code
127.0.0.1 www.mycookbook.com
(the mapping of IP address to host name) will allow you to test the Cookbook web application by typing http://www.mycookbook.com in your browser address bar. This application is already configured to work with Apache. You will notice in the Apache configuration file (httpd.conf) the next lines:
code
ServerName www.mycookbook.com
ProxyPass / http://localhost:3001/
ProxyPassReverse / http://localhost:3001
If you do not want to configure the mapping of IP address to host name directives in Windows Hosts file, the Cookbook application can also be deployed by typing in your browser address bar http://localhost:3001. In the same manner, the Typo blogging software (the second application included as default with Instant Rails) can be found at http://localhost:3002.

In case of errors, you must stop any other web server you might use and retry to launch InstantRails.exe file. This manner of setting up a Ruby on Rails testing and development environment on Windows will be very helpful to beginner webmasters who need to learn how to create and deploy web applications based on this efficient programming language.