Creating a Rails 3 Project with RubyMine and PostgreSQL on a Windows 7 Machine

Ruby gems and Windows don’t always get on – only try doing Rails projects on a Windows 7 machine if you’re feeling brave.

Downloads:
RubyMine
RubyInstaller for Windows (contains RubyGems, so you don’t need to download the gems separately)

In RubyMine,
File > New Project…
Specify the project name and set the Project type to ‘Rails application’. Click ‘OK’
Set the Ruby Interpreter to the Ruby installation (click the button next to the dropdown)
Click the button next to the Rails Version dropdown to install the Rails gem
Tick the ‘Preconfigure for selected database’ box and select ‘postgresql’
Wait for RubyMine to generate the project files
Replace the
gem 'pg'
line in the project’s Gemfile with
gem 'pg', '0.9.0', :require => 'pg'
– the latest version at this time won’t work with Windows 7
Tools > Bundler > Install

You’ll now be able to run rake tasks.

Advertisements

About Jennifer Phillips Campbell

Software Developer and Medieval Historian
This entry was posted in Ruby on Rails. Bookmark the permalink.

One Response to Creating a Rails 3 Project with RubyMine and PostgreSQL on a Windows 7 Machine

  1. Pascal Hamel says:

    Very very helpful post, thanks a lot!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s