Topic: WinXPro, Ruby on Rails and PostgreSQL
Hello folks, I'm starting from scratch learning Ruby on Rails (RoR) with PostgreSQL (pgsl) as my database engine. A friend recommended pgsl over MySQL and that's why I've decided to go against the grain. The book I'm working through is Beginning Ruby on Rails by Steven Holzner and uses MySQL.
Long story short, after several hours of trial and error I finally configured RoR to work with pgsl!! This forum and siz's post (http://railsforum.com/viewtopic.php?pid=59937#p59937) was helpful.
Here are the steps I used to get Ruby on Rails and PostgreSQL installed on Windows XP Professional SP3. Your comments and feedback are appreciated.
1. Install Ruby on Rails 1.8.6-27 Release Candidate 2 (ruby186-27_rc2.exe) from http://rubyforge.org/frs/?group_id-167
2. During Ruby-186-27 Setup, check "Enable RubyGems" component to install
2. Install PostgreSQL 8.3.7-1 (postgresql-8.3.7-1-windows.exe) from http://www.enterprisedb.com/products/pg do#windows
3. Cancel PostgreSQL's Application Stack Builder wizard
4. Add the ruby\bin and the PostgreSQL\8.3\bin directories to your path statement
-- Next series of commands are entered at the command line (cmd)
5. run "gem install rails
6. "gem update --system"
7. "ruby -v" (should echo back "ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]")
(optional Mongrel install) "gem install mongrel mongrel_cluster"
8. "gem install ruby-postgres" (if that fails use "postgres-pr" instead of "ruby-postgres")
9. in irb type "require 'postgres'" (should return =>true)
... if ordinal 284... library SSLEAY32.dll error occurs then
- "exit" irb
- copy LIBEAY32.dll and SSLEAY32.dll from PostgrenSQL\8.3\bin
- overwrite LIBEAY32.dll and SSLEAY32.dll in Ruby\bin
- redo #9 step in irb
The following link (http://www.robbyonrails.com/articles/20 sql-on-osx) contails additional steps to verify configuration. Despite the article being written for OS X, this will work on WinXP.
Note: 4th bullet under "Test Rails + PostgreSQL" talks about generating a new model to test with. The command cited is "./script/generate model Argonista" I had to use "ruby script/generate model Argonista" for this step to work.
Funny how easy this looks after the fact. Its like a no-brainer now, but wasn't last night! I'm sure I'll be crying for help on another simple item. Please be patient with me, I'm hoping to learn this stuff.