Damien Robert
2011-Nov-25 12:37 UTC
[webgen-users] Use RbConfig instead of obsolete and deprecated Config
Hi everyone, since my last gem update, I get the following error when using webgen: /home/dams/opt/ruby/gems/webgen-0.5.14/lib/webgen/cli/utils.rb:10: Use RbConfig instead of obsolete and deprecated Config. /usr/lib/ruby/1.9.1/psych.rb:154:in `parse'': (<unknown>): couldn''t parse YAML at line 21 column 9 (Psych::SyntaxError) from /usr/libb/ruby/1.9.1/psych.rb:154:in `parse_stream'' from /usr/lib/ruby/1.9.1/psych.rb:125:in `parse'' from /usr/lib/ruby/1.9.1/psych.rb:112:in `load''loadfrom /home/dams/opt/ruby/gems/webgen-0.5.14/lib/webgen/website.rb:358:in `read_config_file'' from /home/dams/opt/ruby/gems/webgen-0.5.14/lib//webgen/website.rb:258:in `block in init'' from /home/dams/opt/ruby/gems/s/webgen-0.5.14/lib/webgen/website.rb:316:in `execute_in_env'' from /home/me/dams/opt/ruby/gems/webgen-0.5.14/lib/webgen/website.rb:252:in `init'' from /home/dams/opt/ruby/gems/webgen-0.5.14/lib/webgen/website.rb:271:in `blockk in render'' from /home/dams/opt/ruby/gems/webgen-0.5.14/lib/webgen/webbsite.rb:316:in `execute_in_env'' from /home/dams/opt/ruby/gems/webgen-0.5.14/lib/webgen/website.rb:270:in `render'' from /home/dams/opt/ruby/gems/webgen-0.5.14/lib/webgen/cli/run_command.rb:17:in `execute'' from /home/dams/opt/ruby/gems/cmdparse-2.0.3/lib/cmdparse.rb:436:in `parse'' from /home/dams/opt/ruby/gems/webgen-0.5.14/lib/webgen/cli.rb:125:in `parse'' from /home/dams/opt/ruby/gems/webgen-0.5.14/bin/webgen:6:in `<top (required)>'' from /home/dams/opt/ruby/bin/webgen:19:in `load'' from /home/dams/opt/ruby/bin/in/webgen:19:in `<main>'' I did not change my yaml config files, so it seems like the upgrade of one of the gem broke webgen. Does anyone else has the same problem? Do you know a solution?
On 2011-11-25 13:37 +0100 Damien Robert wrote:> I did not change my yaml config files, so it seems like the upgrade > of one of the gem broke webgen. Does anyone else has the same > problem? Do you know a solution?It seems that you are using webgen with Ruby 1.9 which is currently not really supported! There are some changes in Ruby 1.9, especially the change from the syck YAML library to the psych YAML library, which may cause errors. So please use Ruby 1.8 for the time being! Best regards, Thomas
Johann Friedrich Heinrichmeyer
2012-Feb-03 11:14 UTC
[webgen-users] Use RbConfig instead of obsolete and deprecated Config
With ruby 1.9.3 some strings containing colons or double colons puzzle the yaml parser. Some strings need quoting, i.e. output: ["Webgen::Output::FileSystem", out] works again (you have to quote expressions containing :: ) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/webgen-users/attachments/20120203/1b05603f/attachment-0001.html>
Johann Friedrich Heinrichmeyer
2012-Feb-03 11:17 UTC
[webgen-users] Use RbConfig instead of obsolete and deprecated Config
PS: still no way with webgen and jruby, but that is another story -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/webgen-users/attachments/20120203/f0c774cb/attachment-0001.html>
Johann Friedrich Heinrichmeyer
2012-Feb-03 11:45 UTC
[webgen-users] Use RbConfig instead of obsolete and deprecated Config
PS2: a little tedious, no more brackets with lists that have symbols as key, the following works again: output_path_style: - :parent - :basename - ".xml" here quoting would change the type from symbol to string -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/webgen-users/attachments/20120203/abdb040a/attachment.html>
Johann Friedrich Heinrichmeyer
2012-Feb-03 11:54 UTC
[webgen-users] Use RbConfig instead of obsolete and deprecated Config
In the end, "real" yaml is not ruby friendly ;-) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/webgen-users/attachments/20120203/1a1d470d/attachment.html>
Thomas Leitner
2012-Feb-03 16:34 UTC
[webgen-users] Use RbConfig instead of obsolete and deprecated Config
On 2012-02-03 03:54 -0800 Johann Friedrich Heinrichmeyer wrote:> In the end, "real" yaml is not ruby friendly ;-)The problem lies in the new YAML library, psych, that is used by default on Ruby 1.9.2 and onwards. It is based on libyaml, a newer YAML implementation. The old Ruby YAML library is named syck, btw. Due to psych being libyaml based, this error also occurs in all other programming languages that use libyaml for YAML parsing (e.g. python). This problem is officially recognized, see [1]. You can work around this problem by running export RUBYOPT="-rsyck" before running webgen. This ensures that the "old" library is used instead of the new one and should solve most YAML related problems. Best regards, Thomas [1]: http://bugs.ruby-lang.org/issues/4479