-
Notifications
You must be signed in to change notification settings - Fork 167
uninitialized constant Encoding::US_ASCII installing activerecord gem #163
Comments
Interesting. This is the first report of an encoding issue on the 1.9.1 based Shoes. Which the Policeman build is. Encoding stuff should only happen like that in 1.9.2... how strange. This is from the one you downloaded from the site, or did you compile your own Shoes?
Yeah, that'd be good, I agree. |
The OSX version is 1739. Both the OSX and the Windows versions were downloaded from the shoesrb.com/downloads links. It looks like the offending line is here in common.rb:
So, I just commented out the #force_encoding call in my OSX version so I could get on with what I was trying to do. Obviously, this isn't exactly the ideal solution. From googling, this seemed to be the most relevant result, but isn't Shoes related: brianmario/mysql2#178 My guess is that something strange is happening with namespaces somewhere, but I don't have any specific evidence for that. Once I commented out the #force_encoding, the gem installed and the above code works fine. |
Ah, I misread your report. The Mac version is based on 1.9.2, so that makes a lot more sense. What's happening is that we're not getting all of the encodings loaded somehow. @wasnotrice and I were looking into it, but we still haven't figured out what's up. This is the root reason that the 1.9.1 to 1.9.2 move was so hard for us, so it sucks to see it cropping up... |
It is? valkyrie$ ./shoes -v Apologies. I should've put this in originally. |
@atownley yeah, it is 1.9.2 even though it says 1.9.1. There are lots of places in ruby 1.9.2 that refer to ruby 1.9.1 (lib/libruby.1.9.1.dylib for instance). We're picking up the wrong config var there in the versioning. I found the right one now, though. Thanks! |
This is due to Ruby having a 'library compatability version' of 1.9.1, even with 1.9.2. It's silly. Oh well. |
So this doesn't address the encoding issue, but the ruby version is fixed by b30ed20 Now:
|
Ok. Thanks for the clarifications and the fix for the version stuff. Makes more sense now. |
I'm seeing this same issue. Using Policeman rev 1739 |
Actually, this gets worse once you try and save anything. The Encoding thing bites you in the backside all over the place. The only way I was actually able to continue with what I was doing was to hack the .shoes/+gem/gems/activesupport-3.1.2/lib/active_support/core_ext/string/encoding.rb file to force it to define #encoding_aware? to return false. Doing this (and the above) will allow you to use AR as expected. |
I recieved it when trying to use the serialport gem. |
I am able to do the monkey patch after require 'activerecord' as following
and also i think this can be fix in shoes.rb by add US_ASCII to the line#22
|
Thank you, Jirapong! Another piece in the puzzle of getting Mysql2 to work on Windows 7. http://blog.ideaday.de/max/2012/03/ruby-shoes-and-the-mysql2-gem-on-windows-7/ I've listed the correct patch for all the values you need, taken from the client.rb of Mysql2. Unfortunately we still run into issues: the call never returns and execution hangs at this point. |
Small note about your blog post, @surfnext : Policeman ships with Ruby 1.9.1, not 1.9.2. You might be building shoes from HEAD, which can have 1.9.2 or 1.9.3. |
Thanks, fixed in the article. I use policeman. |
Having the same issue when trying to install the xml-simple gem |
I have just seen this when trying to install both watir and cucumber, any info on the fix without hacking ruby or the operating system? |
No real idea, I'm sorry. Maybe building/compiling shoes yourself could resolve the issue (well it always worked for me) but no guarantees whatsoever :o Tobi |
Will Shoes four fix the issue? :) Also as a bit of a new comer, how would I go about compiling it myself? |
You can read about building shoes in the wiki. And shoes4 is a complete rewrite also with different technology underneath (JRuby + SWT) - so it won't have this issue. Therefore most likely some other issues which we are eagerly working on fixing :-) Tobi |
Ha ha, software tester by trade so believe me i feel your pain. Thanks for the help. |
I've fixed this bug with Shoes3.2 (Linux and Windows) |
Hi folks,
I've been googling and didn't see a reference to this particular issue, so I thought I'd ask it here. I'm trying to load the following test Shoes app:
And all seems to start OK, but then I get the following stack trace:
The gem installation also fails to install on Vista, but the console window is black so I can't see the stack trace. In both cases, this is Policeman from the binary downloads for each platform. The windows one has the video components installed.
BTW, it'd be really handy if you could copy/paste from the console window! :)
Thanks in advance for any help.
Cheers,
ast
The text was updated successfully, but these errors were encountered: