I love rails!

My Rails Attempt

HowTo: Install Rails in Cygwin

with 2 comments

Steps

  1. Install Cygwin
  2. Install Ruby Gems
  3. Install Rails
  4. Install the Database Adapter

Install Cygwin

Using Cygwin’s setup.exe, choose Ruby and sqlite3 under Dev. It is useful to have a version control system in place, so I recommend choosing subversion and git.

If you need MySQL connection for Rails, you need to install gcc also. You will need it to build the Cygwin version of MySQL, which is needed for the Ruby adapter.

Install Ruby Gems

Download Ruby Gems from this link. Make sure you do not have the “RUBYOPT” environment set. If you have a previous installation of Ruby you might have this set in your environment. Unset it. Unzip ruby gems, then run setup.rb.

ruby setup.rb

Install Rails

gem install rails

This will install rails, including the ri and rdoc documentation.

Install the database adapter

To install the sqlite3 adapter,

gem install sqlite3-ruby

To install MySQL support, you need to download the MySQL generic source package and build it. Extract the tarball into a temporary directory, cd to that directory, and then

./configure
make install

Building will take some time. After a successful build,

gem install mysql

If you are prompted for a choice choose the latest ruby version.

Written by pash

October 10, 2008 at 8:31 am

Posted in HowTo

Tagged with ,

2 Responses

Subscribe to comments with RSS.

  1. Does the setup of ruby and rails happen within the cygwin environment? In other words, if you already have rails running in your windows environment, do you have to separately install in cygwin like you have to with vmware?

    tom

    June 26, 2009 at 11:43 am

    • Hi there,

      Hmm, for my windows environment, I’m using InstantRails, but I can’t use that in cygwin so I setup rails in cygwin as well. They don’t affect each other in my experience. So in your case, if you want to develop in cygwin, you have to set it up there as well.

      Cheers :)

      pash

      June 26, 2009 at 2:37 pm


Leave a Reply