开发者

DataObjects::DataError: Reader is not initialized, Rails 3 Ruby 1.9.2 MySQL Production

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 se开发者_StackOverflow社区em 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜