ActiveRecord::Store - serialize - psych LoadError #99

Closed
ghost opened this Issue Nov 7, 2012 · 1 comment

0 participants

@ghost

I encountered a weird problem while using ActiveRecord::Store module in my Ruby on Rails app.

As I understand, this module use 'serialize' method under the hood so it just serialize your data to yaml format with maintained by you and ruby built-in psych gem.

It works OK most of the time, but sometimes I get 500 error in my app with the following message:

LoadError (cannot load such file -- enc/trans/single_byte):
~/.rbenv/versions/1.9.3-p286/lib/ruby/1.9.1/psych/visitors/emitter.rb:27:in `write'
~/.rbenv/versions/1.9.3-p286/lib/ruby/1.9.1/psych/visitors/emitter.rb:27:in `end_document'
~/.rbenv/versions/1.9.3-p286/lib/ruby/1.9.1/psych/visitors/emitter.rb:27:in `visit_Psych_Nodes_Document'
~/.rbenv/versions/1.9.3-p286/lib/ruby/1.9.1/psych/visitors/visitor.rb:15:in `visit'
~/.rbenv/versions/1.9.3-p286/lib/ruby/1.9.1/psych/visitors/visitor.rb:5:in `accept'
~/.rbenv/versions/1.9.3-p286/lib/ruby/1.9.1/psych/visitors/emitter.rb:20:in `block in visit_Psych_Nodes_Stream'
~/.rbenv/versions/1.9.3-p286/lib/ruby/1.9.1/psych/visitors/emitter.rb:20:in `each'
~/.rbenv/versions/1.9.3-p286/lib/ruby/1.9.1/psych/visitors/emitter.rb:20:in `visit_Psych_Nodes_Stream'
~/.rbenv/versions/1.9.3-p286/lib/ruby/1.9.1/psych/visitors/visitor.rb:15:in `visit'
~/.rbenv/versions/1.9.3-p286/lib/ruby/1.9.1/psych/visitors/visitor.rb:5:in `accept'
~/.rbenv/versions/1.9.3-p286/lib/ruby/1.9.1/psych/nodes/node.rb:46:in `yaml'
~/.rbenv/versions/1.9.3-p286/lib/ruby/1.9.1/psych.rb:243:in `dump'

As you can see, I use rbenv and ruby 1.9.3-p286. My system is Ubuntu 11.10. Required file exists ~/.rbenv/versions/1.9.3-p286/lib/ruby/1.9.1/i686-linux/enc/trans/single_byte.so. The same error I encountered with ruby 1.9.3-p194. And the most weird part of this problem that this error occurs from time to time.

Does it seem like a bug in psych or is it fault on my side?

Thanks in advance for any help!

@ghost ghost closed this Nov 10, 2012
@ghost

Seems like a more general problem.
Sorry for inconvenience!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment