Strange console output: Rails 3.2.3 + Ruby 1.9.3-p125

15 views
Skip to first unread message

IAmNan

unread,
Apr 13, 2012, 12:13:09 AM4/13/12
to Ruby on Rails: Talk
I'm getting strange results in the rails console after updating to
ruby 1.9.3-p125.

1.9.3p125 :005 > y User.find(10)
User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id"
= ? LIMIT 1 [["id", 10]]
--- !ruby/object:User
attributes:
!binary "aWQ=": 10
!binary "Zmlyc3RfbmFtZQ==": Jane
!binary "bGFzdF9uYW1l": Doe
!binary "ZW1haWw=": jane...@somewhere.com
!binary "Y3JlYXRlZF9hdA==": 2012-04-13 03:07:46.259341000 Z
!binary "dXBkYXRlZF9hdA==": 2012-04-13 03:07:46.259341000 Z
=> nil
1.9.3p125 :006 >

Ruby was installed with RVM and I noticed it updated yaml-0.1.4 at
that time. Maybe an utf-8 encoding issue.

Expected? Known problem? Things to try? Ask the RoR Core group? Log an
issue in github?

IAmNan

unread,
Apr 13, 2012, 3:45:37 PM4/13/12
to rubyonra...@googlegroups.com
If I wasn't clear, ruby 1.9.2 outputs the column names in yaml format, like...
"id": 10 

...where ruby 1.9.3 outputs....
!binary "aWQ=": 10
Reply all
Reply to author
Forward
0 new messages