Thanks for the swift reply Steve,
I've now removed all the encodings that aren't available in MacRuby
and everything works fine.
Thanks for your help!
If anyone else is having the same problem, change this block in client.rb
if defined? Encoding
CHARSET_MAP = {
"armscii8" => nil,
"ascii" => Encoding::US_ASCII,
"big5" => Encoding::Big5,
"binary" => Encoding::ASCII_8BIT,
"cp1250" => nil,
"cp1251" => nil,
"cp1256" => nil,
"cp1257" => nil,
"cp850" => nil,
"cp852" => nil,
"cp866" => nil,
"cp932" => nil,
"dec8" => nil,
"eucjpms" => nil,
"euckr" => nil,
"gb2312" => nil,
"gbk" => nil,
"geostd8" => nil,
"greek" => Encoding::ISO_8859_7,
"hebrew" => Encoding::ISO_8859_8,
"hp8" => nil,
"keybcs2" => nil,
"koi8r" => nil,
"koi8u" => nil,
"latin1" => Encoding::ISO_8859_1,
"latin2" => Encoding::ISO_8859_2,
"latin5" => Encoding::ISO_8859_9,
"latin7" => Encoding::ISO_8859_13,
"macce" => nil,
"macroman" => Encoding::MacRoman,
"sjis" => Encoding::SHIFT_JIS,
"swe7" => nil,
"tis620" => nil,
"ucs2" => Encoding::UTF_16BE,
"ujis" => nil,
"utf8" => Encoding::UTF_8,
}
Thanks
On Tue, Sep 20, 2011 at 10:32 AM, Steve Clarke <[email protected]> wrote:
> Hi Michael,
>
> I've encountered a few gems that use this encoding - prawn to name but one.
> All I do is edit the gem source to remove references to all the encodings I
> don't need - which is most!
>
> I don't know if it's possible to add the additional encoding to macruby?
>
> Steve
>
> On 20 Sep 2011, at 10:04, Michael Baldry wrote:
>
>> Hi guys,
>>
>> I'm attempting to use the mysql2 gem with mac ruby.
>>
>> I do a "macruby install mysql2" then copy the gem directory to my
>> vendor directory.
>>
>> when I require vendor/mysql2 I get this error:
>>
>> `<main>': uninitialized constant Encoding::Windows_1250 (NameError)
>>
>>
>> Am I doing something wrong?
>>
>> Thank you very much!
>> _______________________________________________
>> MacRuby-devel mailing list
>> [email protected]
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
> _______________________________________________
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel