I am following the depot project in the Rails book but I am using PostgreSQL not MySQL. I made the recommended changes to the config/database.yml file: development: adapter: postgresql database: depot_development host: localhost username: byrnejb password: # Warning: The database defined as ''test'' will be erased and # re-generated from your development database when you run ''rake''. # Do not set this db to the same as development or production. test: adapter: postgresql database: depot_test host: localhost username: byrnejb password: production: adapter: postgresql database: depot_production host: localhost username: byrnejb password: but I am nonetheless getting the following errors: /app/controllers/admin_controller.rb:8:in `list'' /app/controllers/admin_controller.rb:3:in `index'' script/server:49 Show framework trace c:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/activerecord- 1.11.1/lib/active_record/vendor/mysql411.rb:47:in `initialize'' c:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/activerecord- 1.11.1/lib/active_record/vendor/mysql411.rb:47:in `new'' c:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/activerecord- 1.11.1/lib/active_record/vendor/mysql411.rb:47:in `real_connect'' c:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/activerecord- 1.11.1/lib/active_record/connection_adapters/mysql_adapter.rb:39:in `mysql_connection'' c:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/activerecord- 1.11.1/lib/active_record/query_cache.rb:52:in `send'' much more snipped...... How do I tell rails to generate for postgresql and not mysql? -- *** e-mail is NOT a secure channel *** James B. Byrne mailto:ByrneJB.<token>@Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3CE delivery <token> = hal
James, Did you restart the server after changing the configuration file? Alessandro -----Mensagem original----- De: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] Em nome de James B. Byrne Enviada em: segunda-feira, 25 de julho de 2005 17:09 Para: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Assunto: [Rails] Depot App. PostgreSQL vs. MySQL question. I am following the depot project in the Rails book but I am using PostgreSQL not MySQL. I made the recommended changes to the config/database.yml file: development: adapter: postgresql database: depot_development host: localhost username: byrnejb password: # Warning: The database defined as ''test'' will be erased and # re-generated from your development database when you run ''rake''. # Do not set this db to the same as development or production. test: adapter: postgresql database: depot_test host: localhost username: byrnejb password: production: adapter: postgresql database: depot_production host: localhost username: byrnejb password: but I am nonetheless getting the following errors: /app/controllers/admin_controller.rb:8:in `list'' /app/controllers/admin_controller.rb:3:in `index'' script/server:49 Show framework trace c:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/activerecord- 1.11.1/lib/active_record/vendor/mysql411.rb:47:in `initialize'' c:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/activerecord- 1.11.1/lib/active_record/vendor/mysql411.rb:47:in `new'' c:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/activerecord- 1.11.1/lib/active_record/vendor/mysql411.rb:47:in `real_connect'' c:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/activerecord- 1.11.1/lib/active_record/connection_adapters/mysql_adapter.rb:39:in `mysql_connection'' c:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/activerecord- 1.11.1/lib/active_record/query_cache.rb:52:in `send'' much more snipped...... How do I tell rails to generate for postgresql and not mysql? -- *** e-mail is NOT a secure channel *** James B. Byrne mailto:ByrneJB.<token>@Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3CE delivery <token> = hal _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.9.4/57 - Release Date: 22/7/2005
The setup for PostgreSQL is somewhat involved and I had taken all of the defaults for it on my evaluation platform, which happens to be a laptop running XPproSP2. There is a web reference that details the necessary steps to get Rails and PostgreSQL working together at wiki.rubyonrails.com/rails/show/PostgreSQL. This proved sufficient to address my issues. As a result of a suggestion made on this list I downloaded EMS PostgreSQL Manager from ww.sqlmanager.net and, at first blush, this tool seems well worth the $195.00 USD price (less 10% if you get a demo first). I have to say I am really enjoying working with PostgreSQL and Rails. This is almost too much fun to be considered work! Regards, Jim -- *** e-mail is NOT a secure channel *** James B. Byrne mailto:ByrneJB.<token>@Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3CE delivery <token> = hal
Deirdre Saoirse Moen
2005-Jul-28 21:55 UTC
Re: RES: Depot App. PostgreSQL vs. MySQL question.
On Thu, 28 Jul 2005, James B. Byrne wrote:> As a result of a suggestion made on this list I downloaded EMS > PostgreSQL Manager from ww.sqlmanager.net and, at first blush, this > tool seems well worth the $195.00 USD price (less 10% if you get a > demo first).For the Mac, the best I''ve found is Aqua Data Studio: http://www.aquafold.com/ -- _Deirdre web / blog: http://deirdre.net/ yarn: http://fuzzyorange.com cat''s blog: http://fuzzyorange.com/vsd/ "Memes are a hoax! Pass it on!"
These two free tools for Postgres are great on the Windows platform dbtools http://www.dbtools.com.br/ pgadmin http://www.pgadmin.org/ andrew ----- Original Message ----- From: "Deirdre Saoirse Moen" <deirdre-mzk6fgDMp2XR7s880joybQ@public.gmane.org> To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> Sent: Friday, July 29, 2005 7:55 AM Subject: Re: RES: [Rails] Depot App. PostgreSQL vs. MySQL question. On Thu, 28 Jul 2005, James B. Byrne wrote:> As a result of a suggestion made on this list I downloaded EMS > PostgreSQL Manager from ww.sqlmanager.net and, at first blush, this > tool seems well worth the $195.00 USD price (less 10% if you get a > demo first).For the Mac, the best I''ve found is Aqua Data Studio: http://www.aquafold.com/ -- _Deirdre web / blog: http://deirdre.net/ yarn: http://fuzzyorange.com cat''s blog: http://fuzzyorange.com/vsd/ "Memes are a hoax! Pass it on!" _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails