0

I seem to have a problem when attempting to run my Rails app on an Ubuntu server. It works perfectly on my development machine (Mac OS X Ruby 1.9.2 p180). I'm using DataMapper as my ORM which is causing the issues (in place of ActiveRecord).

The error is: DataObjects::DataError: Reader is not initialized (code: , sql state: , query: , uri: ) whenever I try to make a database call of any kind. I've checked over the database.yml and this is certainly happening somewhere after a connection is established. I say this because if I provide invalid database details, I get a can't connect (expected) - however when the details are valid I get the above error.

I can't seem to find any mention of it anywhere else and I would heavily appreciate it if someone could give me some pointers in diagnosing this. I'm using Passenger and nginx on the server, but it also occurs in the Rails console (ie. rails c) and manually setting up DataMapper with the same database info results in that error.

tereško
  • 58,060
  • 25
  • 98
  • 150
  • Just to provide a little more information. It turns out that INSERT queries (ie ObjectX.create) and the like work. It is SELECT queries that produce that error only. – Dave Finster May 10 '11 at 00:30
  • And as it turns out, it is affecting the entire development server (regardless of production or development mode) whereas on my development machine it is still okay. – Dave Finster May 10 '11 at 00:42
  • Answer: Turns out that the problem has been fixed. The problem was that there must be some sort of incompatibility in the newest version of DataObjects gem or do_mysql. Downgrading to version 0.10.3 for both and keeping dm-mysql-adapter at ~> 1.1.0 kicked things into gear again. – Dave Finster May 10 '11 at 05:26

1 Answers1

0

Answer: Turns out that the problem has been fixed. The problem was that there must be some sort of incompatibility in the newest version of DataObjects gem or do_mysql. Downgrading to version 0.10.3 for both and keeping dm-mysql-adapter at ~> 1.1.0 kicked things into gear again.