# \[patch\] Rakefile made ready for Psych

**URL:** <https://www.ruby-forum.com/t/patch-rakefile-made-ready-for-psych/211426>\
**Category:** wxRuby\
**Created:** [September 3, 2011, 10:51pm UTC](https://www.ruby-forum.com/t/patch-rakefile-made-ready-for-psych/211426 "2011-09-03T22:51:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [September 3, 2011, 10:51pm UTC](https://www.ruby-forum.com/t/patch-rakefile-made-ready-for-psych/211426/1 "2011-09-03T22:51:22Z")

</div>

Hi there,

I don’t know wheather any of the wxRuby devs has tried to compile  
wxRuby on Ruby 1.9 with Psych enabled (Ruby’s new YAML parser  
automatically used by RubyGems if available–Psych is available if  
libyaml was available when Ruby was compiled. Note this is NOT the  
case for most packaged Rubies (Ubuntu/Debian/Arch Linux for sure) for  
whatever reason). If you do

$ rake

wxRuby compiles just fine, but

$ rake gem --trace

gives you a wonderful backtrace you may have a look at here:  
[http://pastie.org/2477361](http://pastie.org/2477361)

To correct this, you just need to apply this patch against 2.0.1’s  
rakefile.

=============================================  
— rakefile.old 2011-09-03 21:30:22.495623323 +0200  
+++ rakefile 2011-09-03 22:01:03.332381015 +0200  
@@ -2,6 +2,12 @@

# Copyright 2004-2008 by wxRuby development team

# Released under the MIT-style wxruby2 license

+begin

- require “psych”  
+rescue LoadError  
+end  
+require “yaml”
- 

# Influential environment variables

# WXRUBY\_RELEASE : build a release version, stripped of debugging

info

# WXRUBY\_DEBUG : build a debug version

=============================================

Another question: Will there ever be a precompiled 64-bit version of  
wxRuby 2.0.1 for Linux? I can provide one, but I don’t have the rights  
to push it to [rubygems.org](http://rubygems.org) making it available for direct  
installation. Tell me where to put it, and you can download it and  
push it where it ought to be.

Valete,  
Marvin

---

<div class="post-metadata">

**Author:** ![quintus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/49beb7/32.png) [@quintus](https://www.ruby-forum.com/u/quintus)\
**Post date:** [September 6, 2011, 7:07pm UTC](https://www.ruby-forum.com/t/patch-rakefile-made-ready-for-psych/211426/2 "2011-09-06T19:07:10Z")

</div>

Hi

On 03/09/2011 21:04, Quintus wrote:

> $ rake gem --trace
> 
> gives you a wonderful backtrace you may have a look at here:  
> [http://pastie.org/2477361](http://pastie.org/2477361)

Thanks very much for the report and patch. I’ve been using distro linux  
so hadn’t come across it.

Can the change be applied somewhere later, and nearer to the bug it  
tickles, instead of at the head of the main rakefile? For example, could  
it go at the start of rake/rakepackage.rb, before the requires there,  
since it seems to relate to gem tasks?

Also, can it have a one-line comment note of the bug it fixes please,  
and the Ruby version affected?

> Another question: Will there ever be a precompiled 64-bit version of  
> wxRuby 2.0.1 for Linux? I can provide one, but I don’t have the rights  
> to push it to [rubygems.org](http://rubygems.org) making it available for direct  
> installation. Tell me where to put it, and you can download it and  
> push it where it ought to be.

Would be happy to accept and upload a 64-bit version, thank you. Please  
drop me a line off-list.

alex

---

<div class="post-metadata">

**Author:** ![quintus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/49beb7/32.png) [@quintus](https://www.ruby-forum.com/u/quintus)\
**Post date:** [September 6, 2011, 8:37pm UTC](https://www.ruby-forum.com/t/patch-rakefile-made-ready-for-psych/211426/3 "2011-09-06T20:37:51Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Am 06.09.2011 19:04, schrieb Alex F.:

> Can the change be applied somewhere later, and nearer to the bug  
> it tickles, instead of at the head of the main rakefile? For  
> example, could it go at the start of rake/rakepackage.rb, before  
> the requires there, since it seems to relate to gem tasks?

I’ll try, but the problem is that it must come before any attempt to  
require yaml.rb, because otherwise Syck is already loaded. I’ll post  
again when I know more.

> Also, can it have a one-line comment note of the bug it fixes  
> please, and the Ruby version affected?

Of course it can^^. And just for the record, I’ve experienced the  
problem with

ruby 1.9.2p290 (2011-07-09 revision 32553) [x86\_64-linux]

Vale,  
Marvin

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.11 (GNU/Linux)  
Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org/](http://enigmail.mozdev.org/)

iQEcBAEBAgAGBQJOZl+4AAoJELh1XLHFkqhaLQoIAJLg3bY8SK4Zy0T9uhwtrf8Y  
xed7Y4tDih2MiCtwqv3KMZL6411XXY0I8CZAh4yA+Z+UOFT39f2W3Y7vtqUlAJc8  
qcTA2DfxNfh/VXXy4DkAUhbkd0bOFdBFzOGuWDGQPcDjjtA3L0vxEDtluutJUWuX  
KvG4e1N6I3JMK9OZJZ9yurByD2Zlv67W5Bx3AXD99jc5vEHA2a9Lvy+7dtP/iRVw  
x1ZeqETaY120bIxDZtUw4uieLYf6t+kgeMm2u2lMYRN446f2W5RrndDMlGwK7mSF  
0zZSd57nv2NbHbDmZUWHNSVcIc6d7ktN28ubODIzKM5m9AuZmzeGwD6irjMVJyM=  
=mu5s  
-----END PGP SIGNATURE-----
