+45 70 27 40 08

sales@meeho.net

» Regarding “undefined method `quote_ident’ for PGconn:Class”

Posted by Kasper Tidemann on Monday 7th of December 2009 03:59:03 AM

If you are a Ruby on Rails developer, use PostgreSQL and receive the error

undefined method `quote_ident' for PGconn:Class

… when you have updated your rails to version >2.2, you can solve the above problem by 1) creating a new file in config/initializers with the name new_rails_defaults.rb, and 2) insert the following content:

def PGconn.quote_ident(name)
%("#{name}")
end

… so the file looks like this, thus making your rails application work again:

new_rails_defaults.rb med koden, her vist i TextMate.

new_rails_defaults.rb with the code shown in TextMate.

 

1

Kasper Tidemann

Kasper Tidemann says:

Hello you lovely English speaking visitors. If you've stumbled upon this page trying to fix your broken Ruby on Rails app and you find the above text somewhat cryptic, please do note that the English version of our blog is under way - it will be up in January 2010.

Until then, please write me at kt@meeho.dk for tips on how to fix the postgres-pr problem and get your app up and running again.

 

2

Rasmus says:

Skide godt! Gal det er sort snak...

 

3

Kasper Tidemann

Kasper Tidemann says:

Det er open source, når det er allerværst. Og vi elsker det jo alligevel. :)

 

If you have something to say, feel free to drop a comment below:

Type in your name here

Type in your e-mail address here

Type in your web site address here

 

+45 70 27 40 08
Open office hours

info@meeho.net

support@meeho.net

News from the Meeho!™ Blog:

02/14 2011 » Fixing the "NoMethodError: undefined method ‘to_sym' for false:FalseClass" error when working with I18n in Ruby on Rails

02/03 2011 » Soon to come: IMAP integration

01/27 2011 » Meeho!™ App version 1.0.3 is out!

01/26 2011 » Cool new iPad stand

We live at Diplomvej 381, 2800 Kgs. Lyngby, Denmark: