We have updated the rails version from 2.1.1 to 2.3.3 and we get the folowing error message: undefined method `quote_ident'' for PGconn:Class Any idea about it? Thanks in advance.
I have the very same problem when migrating from rails 2.3.2 to 2.3.3. Nothing else has been modified. Please help... Shall we wait for a new version of postgres-pr (actual 0.6.1) ? Thanks On 27 juil, 18:58, rrg1970 <rrn...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> We have updated the rails version from 2.1.1 to 2.3.3 and we get the > folowing error message: > > undefinedmethod`quote_ident'' forPGconn:Class > > Any idea about it? > > Thanks in advance.
OK. Now there is a temporary solution, I suppose before postgres-pr gets updated... It''s very well explained here : http://github.com/mneumann/postgres-pr/issues/unreads#issue/1 You need to add to : config/initializers/new_rails_defaults.rb, the following : def PGconn.quote_ident(name) %("#{name}") end On Jul 31, 6:34 pm, MadChipset <madchip...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have the very same problem when migrating from rails 2.3.2 to 2.3.3. > Nothing else has been modified. > > Please help... > > Shall we wait for a new version of postgres-pr (actual 0.6.1) ? > > Thanks > > On 27 juil, 18:58, rrg1970 <rrn...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > We have updated the rails version from 2.1.1 to 2.3.3 and we get the > > folowing error message: > > > undefinedmethod`quote_ident'' forPGconn:Class > > > Any idea about it? > > > Thanks in advance.
That fix is being ignored in my case. Win XP I get exactly the same error. When I run the console it is modifying the class however. On Aug 1, 2:55 am, MadChipset <madchip...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> OK. Now there is a temporary solution, I suppose before postgres-pr > gets updated... It''s very well explained here :http://github.com/mneumann/postgres-pr/issues/unreads#issue/1 > > You need to add to : config/initializers/new_rails_defaults.rb, the > following : > > def PGconn.quote_ident(name) > %("#{name}") > end > > On Jul 31, 6:34 pm, MadChipset <madchip...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I have the very same problem when migrating from rails 2.3.2 to 2.3.3. > > Nothing else has been modified. > > > Please help... > > > Shall we wait for a new version of postgres-pr (actual 0.6.1) ? > > > Thanks > > > On 27 juil, 18:58, rrg1970 <rrn...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > > We have updated the rails version from 2.1.1 to 2.3.3 and we get the > > > folowing error message: > > > > undefinedmethod`quote_ident'' forPGconn:Class > > > > Any idea about it? > > > > Thanks in advance.
ha... my problem was I was running a rake take so the initializers weren''t being run this seems to have worked for me: rake db:create:all -P development On Aug 1, 3:07 pm, Doug <dgoldi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> That fix is being ignored in my case. Win XP > > I get exactly the same error. > > When I run the console it is modifying the class however. > > On Aug 1, 2:55 am, MadChipset <madchip...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > OK. Now there is a temporary solution, I suppose before postgres-pr > > gets updated... It''s very well explained here :http://github.com/mneumann/postgres-pr/issues/unreads#issue/1 > > > You need to add to : config/initializers/new_rails_defaults.rb, the > > following : > > > def PGconn.quote_ident(name) > > %("#{name}") > > end > > > On Jul 31, 6:34 pm, MadChipset <madchip...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > I have the very same problem when migrating from rails 2.3.2 to 2.3.3. > > > Nothing else has been modified. > > > > Please help... > > > > Shall we wait for a new version of postgres-pr (actual 0.6.1) ? > > > > Thanks > > > > On 27 juil, 18:58, rrg1970 <rrn...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > > > We have updated the rails version from 2.1.1 to 2.3.3 and we get the > > > > folowing error message: > > > > > undefinedmethod`quote_ident'' forPGconn:Class > > > > > Any idea about it? > > > > > Thanks in advance.
On Aug 2, 8:59 am, Doug <dgoldi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> ha... my problem was I was running a rake take > so the initializers weren''t being runYes I hit that problem as well. It can be addressed by placing the patch directly into active_record rather than into new_rails_defaults.rb as suggested earlier. i.e. whack the patch in: active_record/connection_adapters/postgresql_adapter.rb cheers, mick