Hi Heroku people!
I started trying out Heroku today and was really impressed and
relieved after struggling many days with a hopeless fcgi deployment
scenario on a big but Rails-unfriendly hosting company. I only wished
I had discovered Heroku earlier and saved myself many late nights of
swearing and desperation.
But... Although everything seemed to work 95% perfectly on the first
try, I'm getting some bizarre errors, and I'm hoping there are people
out there with some suggestions, because I'm pretty perplexed.
So this is what I get in my log:
ActiveRecord::StatementInvalid (PGError: ERROR: column firstpeer
does not exist
LINE 1: SELECT * FROM switches WHERE (firstPeer = 15 OR
secondPeer...
^
: SELECT * FROM switches WHERE (firstPeer = 15 OR secondPeer =
15) ):
AR is complaining that there is no column firstpeer. I'm not sure if
the fact that it is all lower case has any significance. The actual
column is named firstPeer, as visible in the SQL log lines.
The source line that gives rise to this error is located in
Application.rb, and looks like this:
switches = Switch.all(:conditions = ['firstPeer = :myID OR secondPeer
= :myID' , {:myID = @chatter.id}])
Nevertheless, the following line in another script (in initializers)
does get executed w/o problems:
switch = Switch.create(:firstPeer = chatter.id , :secondPeer =
peer.id, :distance = dist)
and executing heroku console Switch.all, I get: [#Switch id: 1,
firstPeer: 1, secondPeer: 2, created_at: 2009-02-22 17:11:26,
updated_at: 2009-02-22 17:11:26, distance: 1235986.83901638, etc
Being rather new to Rails and completely new to Heroku, I have
absolutely no idea what might be going on.
I develop using MySQL locally, and used that for my former deployment
(which sucked but never threw this error at me) but mysql/posrgre
issues could hardly have anything to do with this.
My app forks off processes using the Spawn plugin, some running for a
few secs, and some for as long as the main thread (at least that's the
intention). All of this *seems* to work fine, although the error I've
just described makes it hard to check this thoroughly. Could spawning
processes (basically the same as a unix fork) cause any troubles?
I would be *very* grateful for any (quick) comments and suggestions,
as I'm really eager to get my app to work on Heroku.
/F
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Heroku group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to
heroku+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---