Softpedia
 

NEWS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
Home > News > Webmaster > Tips and Tricks

August 22nd, 2007, 16:31 GMT · By Adrian Placinta

Install Rails on Windows Using Cygwin

SHARE:

Adjust text size:


Ruby Rails
Enlarge picture
Ruby on Rails is an open source Ruby framework for developing web-based, database-driven applications. Ruby on Rails divides itself into various packages, namely Active Record, Action Pack, Active Support, Action Mailer and Action Web Service. In addition, Developers can create plugins to extend existing packages.

Ruby on Rails is considered by some developers to be the super productive new way to develop web applications. Rails takes full advantage of Ruby.

Cygwin is a Linux-like environment for Windows. The Cygwin tools are ports of the popular GNU development tools for Microsoft Windows. They run thanks to the Cygwin library which provides the UNIX system calls and environment these programs expect. Cygwin runs on all 32bit versions of Windows. Cygwin consists in a DLL that implements the POSIX system call API in terms of Win32 system calls. When you install Cygwin, you will have access to many Unix utilities. Also, programmers may write Win32 and GUI applications that make use of the
standard Microsoft Win32 API and/or the Cygwin API.

Installing Cygwin is very simple. Download Cygwin 1.5.24-2 and run setup.exe. Select Install from Internet if your computer is connected to the Internet and you want to install after the download of the files is completed. Is you want to install cygwin later, select Download without installing and later you may run again the installer and select Install from Local Directory. In the next window, select the folder where you want to install Cygwin and select to Install for All user and select Default Binary File Type to Unix/binary. To learn more about file modes, go to this page. After that, select where to store the downloaded files (chose c:cgywin-setup), then select your connection type, the mirror from where you want to download the files.

Select packages for CygWin
Enlarge picture
The final step is to select the packages you want to install. If you are a beginner, the easiest way is to install all packages, but if you know what you want, select only what you need. If you choose manually the packages, make sure you choose from the Dev: Ruby, gcc and subversion. You will need gcc to build Cygwin version of MySQL. If you select All, make sure that you have ~700Mb available space for downloaded files and another 2.81GB for installation directory.





Wait...wait...wait...
Enlarge picture
While you wait for the cygwin installation to be complete, you may download and install MySQL for Windows. After that, download the source code package for MySQL. Extract everything from the archive to c:/cygwinmysql.




Compiling...30 minutes at least
Enlarge picture
Then start Cygwin and type:

./configure
make install


This will compile mysql to work with Cygwin. You must do this because you will need it when you configure Rails MySQL connector. Building MySQL under Cygwin will take some time, so be prepared. Meanwhile download Gems.

ruby setup.rb
Enlarge picture
To install Gems, extract the files from the archive in c:/cygwin/ruby and type ruby setup.rb. After that, we can install Rails.





Enlarge picture
Execute gem install rails --include-dependencies.

To install MySQL Gems, execute gem install mysql. When asked what version you want to install, choose mysql 2.7 (ruby), not mywin32 version.

That's it! Now you have everything installed and the MySQL connection should work.

TELL US WHAT YOU THINK:

11,363 hits · Link to this article · Print article · Send to friend · Subscribe to news

MUST-READ RELATED ARTICLES:


Server-side Programming

Create MySQL database backup

Install and configure MySQL for Windows

READER COMMENTS:



No user comments yet.
Be the first to express your opinion!
Copyright © 2001-2012 Softpedia. Contact/Tip us at

WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM