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?
_______________________________________________
webgen-users mailing list
webgen...@rubyforge.org
http://rubyforge.org/mailman/listinfo/webgen-users
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
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