Member 785602 0 Newbie Poster

I've just upgraded an existing app from Rails 1.2.5 (Ruby 1.8.5) to Rails 2.3.8. There were several issues to the upgrade including finding and installing a good MySQL gem (dll in my case).

This app worked fine on Rails 1.2.5 but I needed to upgrade for security concerns.

There are many tables. I'm having trouble with two that I know of. Both tables have encrypted fields in them (not all fields) that the app does (we don't ask MySQL to do it) using OpneSSL cyphers.

The app reads in a csv file and stores the data in MySQL.

Several models of child tables (belongs_to :parent) work fine. The model for the parent table (has_many :children) errors out on a save!. The model for the one problematic child table (containing encrypted fields) also errors out on save!. Both give a cryptic error that after two days of googling, I can't find. The error is "NoMethodError (undefined method `|' for "0":String).

In trying to track this down in the app, in the model I've commented out all association code, all attribute accessor code, all validataion code, and the encryption call; reloaded the models in the webserver, and got the same error (i.e. without using the encryption call or library). In the controller, I've determined that the only line of code that's a problem is the "model.save!".

The error first arises from ..Ruby\lib\....\ActiveRecord\transaction.rb but I can't find an issue there.

For some reason I believe it must be a problem with the encryption but I can't get rid of the error by uninstalling the encryption programs. Besides, I can read the data in ruby/console (ie the decryption works fine). The data is stored encrypted in ordinary "varchar" fields encoded in base64. Base64 works under Rails 2.3.8.

Has anybody has a similar problem upgrading to rails 2.x.x? If not, have you seen this error? If not, can you tell me where to go to find out what this error really means? Any help or direction would be greatly appreciated.