Toby Corballis
2006-Apr-22 13:33 UTC
[Rails] Connecting to existing postgreSQL database in Win32
I''ve been runnning Perl under Apache for a while but have decided to try using Ruby-on-Rails. My current database is postgreSQL 8.1. I have no problem connecting to it using Perl or PHP 5. However, I''m obviously missing something ''cos no matter what I do I cannot connect to the database from RoR. I have followed all of the instructions I could find and when I start irb and type "require ''postgres''" I get the value ''true'' echoed back to me. My database is called bookkeeping and has several tables, one of which is called ''address''. I''ve changed the .yml file to have the following: development: adapter: postgresql database: bookkeeping_dev username: toby password: whatever host: localhost schema_search_path: public test: adapter: postgresql database: bookkeeping_test username: toby password: whatever host: localhost schema_search_path: public production: adapter: postgresql database: bookkeeping username: toby password: whatever host: localhost schema_search_path: public I''ve generated the app files by using the following commands: rails bookkeeping ruby script/generate model address ruby script/generate controller address When I try to start WEBrik I get the following response: [2006-04-22 14:30:54] INFO WEBrick 1.3.1 [2006-04-22 14:30:54] INFO ruby 1.8.2 (2004-12-25) [i386-mswin32] [2006-04-22 14:30:54] INFO WEBrick::HTTPServer#start: pid=13984 port=3000 c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_ adapters/postgresql_adapter.rb:24: [BUG] Segmentation fault ruby 1.8.2 (2004-12-25) [i386-mswin32] This application has requested the Runtime to terminate it in an unusual way. Please contact the application''s support team for more information. Can anyone help before I decide that cutting my head off with a plastic fork is more fun :) Many thanks -- Posted via http://www.ruby-forum.com/.