Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8834429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:00:46+00:00 2026-06-14T09:00:46+00:00

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

  • 0

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 ruby built-in psych gem.

It works OK most of the time, but sometimes I get 500 error 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.

So maybe someone encountered this problem too and has already found a solution? Or does it seem more like a bug in psych and I should file it to its maintainer?

Thanks in advance for any help!

EDIT: the problem isn’t directrly related to psych gem. It’s general problem with unusual ruby setup. See the accepted answer below for details.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T09:00:48+00:00Added an answer on June 14, 2026 at 9:00 am

    Is this happening within the cozy confines of your development environment? If so, I’d consider running it under pry-rescue‘s Pry.rescue do … end block and poking around while there.

    I suspect a data difference. Is there any non-ASCII intentionally involved in this tree? You could hunt it down with something like this:

    ruby -e 'Dir["**/*.yml"].each{|e| File.read(e)[/[^\x0-\x7f]/] and puts e}' 
    

    As you indicated below, the rbenv installation is shared with other users, so be sure to redo the permissions upon any change:

     chmod a+r -R ~/.rbenv/
    

    Or perhaps create a shared group, such as src, then:

     chgrp src ~/.rbenv && chmod g+r -R ~/.rbenv
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I encountered a weird problem while using python multiprocessing library. My code is sketched
I'm using VS10 and C# and I've encountered a weird problem. I have 2
I've encountered a very weird problem with WF4: when I use Switch activity and
I'm new to working with XML, and I've encountered a weird problem while trying
I encountered today a weird bug with an app I'm working on. The problem
I have encountered a weird problem, when i built my last ad-hoc version for
I have encountered a weird situation while updating/upgrading some legacy code. I have a
I have encountered a very weird situation in Python. I have a while True:
i encountered a problem using the apache commons-net telnet api, and hope you can
I encountered a weird problem when trying to write a cross-browser script. Basically my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.