[Rails] Mysterious Pg syntax error: EXPLAIN BEGIN

2012-08-28 Thread ddoherty03
I have been getting the following exception lately using the postgresql adapter. It seems to be related to Transactions, since it mentions BEGIN. I had a model named Transaction, which I thought might be causing the problem, so I renamed it to Transact. But I still get the error.

Re: [Rails] Mysterious Pg syntax error: EXPLAIN BEGIN

2012-08-28 Thread ddoherty03
Colin, Thanks for the reply. I have checked out the issuer.id and filer.id variables and they look rational---they point to actual records---when the exception is thrown. I notice that the exception occurs at random points and seems to be independent of the data provided. I have temporarily

[Rails] Re: RoR App - Location Search Gem/Algorithm?

2012-08-28 Thread ddoherty03
Take a look at this: http://en.wikipedia.org/wiki/Great-circle_distance On Tuesday, August 28, 2012 11:15:51 AM UTC-5, William Moss wrote: Hi guys Just a question... I need some advice I am looking to put together a RoR app to interface with an iPhone app The iPhone app will be like

[Rails] Re: Mysterious Pg syntax error: EXPLAIN BEGIN

2012-08-28 Thread ddoherty03
Colin, I tried googling the error message with no hits. Thanks for the link. Regards, Dan -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this

Re: [Rails] Updating attribute on dependent of many-to-on association

2012-05-25 Thread ddoherty03
Colin, Thanks for taking a look at this. After a good night's sleep, I came back to this, and the problem appears to be that I need to self.reload after the loop. I believe this is because of the nature of the association, which depend on whether debit is true or false, and I believe need

[Rails] Updating attribute on dependent of many-to-on association

2012-05-24 Thread ddoherty03
All, I posted this over on comp.lang.ruby, but realized I should probably keep Rails questions to this group, so soory for the cross-post. I have a rails app with a Transaction class that has_many :entries. Each Transaction has many entries, and those with the debit attribute true are debits,

[Rails] Re: after initialize blowing up---help

2011-06-12 Thread ddoherty03
All, In case you are following this, Frank is right, this was fixed in rails 3.0.7 in April, 2011. I upgraded to rails 3.0.8. and the problem went away. Regards, Dan. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To view this

[Rails] Re: after initialize blowing up---help

2011-06-12 Thread ddoherty03
Oops, I meant Frederick. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/4L_RWR6IMHAJ. To post to this group, send email to

[Rails] after initialize blowing up---help

2011-06-11 Thread ddoherty03
All, Can anyone see what's happening here? == migration === class CreateGreetings ActiveRecord::Migration def self.up create_table :greetings do |t| t.string :greet t.string :language t.integer :count t.timestamps end end

Re: [Rails] after initialize blowing up---help

2011-06-11 Thread ddoherty03
Colin, Yes. I have run the migration. Here is the schema: schema.rb === ActiveRecord::Schema.define(:version = 20110609145209) do create_table greetings, :force = true do |t| t.string greet t.string language t.integer count

Re: [Rails] after initialize blowing up---help

2011-06-11 Thread ddoherty03
Oh, and this might be relevant: $ rails -v Rails 3.0.3 $ ruby -v ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux] Thanks. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To view this discussion on the web visit

Re: [Rails] after initialize blowing up---help

2011-06-11 Thread ddoherty03
Colin, Good catch. When I correct the typo, though, I still get the same error. I get this in another app too, so this seems to be something else going on here. Regards, -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To view this

Re: [Rails] after initialize blowing up---help

2011-06-11 Thread ddoherty03
Here is the method that is blowing up: = greeting.rb == class Greeting ActiveRecord::Base after_initialize :check_greet validates_uniqueness_of :count def check_greet self.language = language.capitalize end end

Re: [Rails] after initialize blowing up---help

2011-06-11 Thread ddoherty03
Pavling, Thanks for the comment. If I understand it, though, I don't believe that's what's going on here. I am not redefining the after_initialize method, just using it to add a callback into the object creation stream. This is pretty standard. But when the validation test is run, it seems

Re: [Rails] after initialize blowing up---help

2011-06-11 Thread ddoherty03
Colin, Many thanks again. That looks like it's the problem. Also looks like it's been around about 3 years. Regards, Dan -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To view this discussion on the web visit

[Rails] Fixtures rejecting reference to 'belongs_to' association

2011-06-07 Thread ddoherty03
I have a stock-related rails app, and I want to test the Price model. Each price object represents daily price data for a single Equity, which in turn belongs to a single Issuer. I've run the test with the following fixtures and get this error: ===

Re: [Rails] Fixtures rejecting reference to 'belongs_to' association

2011-06-07 Thread ddoherty03
Thanks, Colin. That did it. You 'da man. Snow blindness strikes again. Regards, -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To view this discussion on the web visit

[Rails] What's the Right Rails Prologue for a Standalone Program

2009-09-20 Thread ddoherty03
I am trying to write a small program to exercise certain of my Rails classes without having to go through a browser. I have a file that like this: ### filer_convert.rb # require File.dirname(__FILE__) + '/../../config/boot' require 'filer' Filer.convert(10)

[Rails] Re: What's the Right Rails Prologue for a Standalone Program

2009-09-20 Thread ddoherty03
Thanks, pharrinton. That did it. I still get a strange internal error message when I run it under komodo, but I assume that's a komodo issue. On Sep 20, 10:33 pm, pharrington xenogene...@gmail.com wrote: On Sep 20, 3:55 pm, ddoherty03 ddohert...@gmail.com wrote: I am trying to write