Problem with Ruby 1.9.3 RC1 and YAML files

I am trying to get ruby 1.9.3 rc1 to work and it fails because of my
yaml files:

psych.rb:154:in `parse': (/test/system.yml): couldn't parse YAML at line
0 column 0 (Psych::SyntaxError)

If I do this however:

  YAML::ENGINE.yamler = 'syck'

And then load the same yaml file, everything works.

Now the problem is ...

I do not know why psych hates my yaml files and I do not know
whether it is easy to fix. But my yaml files are critical,
and I would rather simply want to use syck and not bother about
psych.

Is that possible or am I stuck now?

Ideally, what I would love to tell ruby would be to permanently
use sykc as the YAML Engine to use and completely ignore psych
everywhere. But I do not want to do this:

  YAML::ENGINE.yamler = 'syck'
  require 'yaml'

In all my .rb files that need to use yaml ...

HELP!

···

--
Posted via http://www.ruby-forum.com/.

Marc Heiler wrote in post #1024429:

I am trying to get ruby 1.9.3 rc1 to work and it fails because of my
yaml files:

psych.rb:154:in `parse': (/test/system.yml): couldn't parse YAML at line
0 column 0 (Psych::SyntaxError)

Does your yaml files contains tabs or UTF BOM identifications?

Please include a sample of your YAML files so we can do testing.

Psych is the default YAML parser of 1.9.3, issues with it should be
addressed (if valid)

Either you stick to 1.9.2 and Syck or help us solve any possible issue
with YAML files.

···

--
Luis Lavena

--
Posted via http://www.ruby-forum.com/\.

Is this a related problem:

$ uname -a
Linux rcc 2.6.32-24-generic #38-Ubuntu SMP Mon Jul 5 09:20:59 UTC 2010
x86_64 GNU/Linux

$ ruby -v
ruby 1.9.3dev (2011-09-23 revision 33323) [x86_64-linux]

$ sudo gem install rake
/usr/local/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.

Prasad

···

2011/10/1 Luis Lavena <luislavena@gmail.com>

Either you stick to 1.9.2 and Syck or help us solve any possible issue
with YAML files.

--
Luis Lavena

--
Posted via http://www.ruby-forum.com/\.

The cause could be this:

$ cat -n ruby-1.9.pc
     1 arch=i386-cygwin
     2 sitearch=${arch}
     3 prefix=/usr/local
     4 exec_prefix=${prefix}
     5 bindir=${exec_prefix}/bin
     6 libdir=${exec_prefix}/lib
     7 includedir=${prefix}/include
     8 MAJOR=1
     9 MINOR=9
    10 TEENY=1
    11 ruby_version=1.9.1
    12 RUBY_PROGRAM_VERSION=1.9.3
    13 RUBY_BASE_NAME=ruby
    14 RUBY_SO_NAME=${RUBY_BASE_NAME}191
    15 RUBY_INSTALL_NAME=${RUBY_BASE_NAME}19
    16 DEFFILE=
    17 LIBPATH=
    18 LIBRUBY_A=lib${RUBY_SO_NAME}-static.a
    19 LIBRUBY_SO=cyg${RUBY_SO_NAME}.dll
    20 LIBRUBY=lib${RUBY_SO_NAME}.dll.a
    21 LIBRUBYARG_SHARED=-l${RUBY_SO_NAME}
    22 LIBRUBYARG_STATIC=-l${RUBY_SO_NAME}-static
    23 LIBRUBYARG=${LIBRUBYARG_SHARED}
    24 LIBS=-lpthread -lrt -ldl -lcrypt
    25 DLDFLAGS= -Wl,--enable-auto-image-base,--enable-auto-import
    26 ruby=${bindir}/${RUBY_INSTALL_NAME}.exe
    27 rubyhdrdir=${includedir}/${RUBY_BASE_NAME}-${ruby_version}
    28 vendorhdrdir=${rubyhdrdir}/vendor_ruby
    29 sitehdrdir=${rubyhdrdir}/site_ruby
    30
    31 Name: Ruby
    32 Description: Object Oriented Script Language
    33 Version: ${ruby_version}
    34 URL: http://www.ruby-lang.org
    35 Cflags: -I${rubyhdrdir}/${arch} -I${rubyhdrdir}
    36 Libs: ${DLDFLAGS} ${LIBRUBYARG_SHARED} ${LIBS}
    37 Requires:

See line 10, 11 and 14. Is this the way it must be?

Kind regards

robert

···

On Mon, Oct 3, 2011 at 9:01 AM, prasad <gdprasad@gmail.com> wrote:

2011/10/1 Luis Lavena <luislavena@gmail.com>

Either you stick to 1.9.2 and Syck or help us solve any possible issue
with YAML files.

Is this a related problem:

$ uname -a
Linux rcc 2.6.32-24-generic #38-Ubuntu SMP Mon Jul 5 09:20:59 UTC 2010
x86_64 GNU/Linux

$ ruby -v
ruby 1.9.3dev (2011-09-23 revision 33323) [x86_64-linux]

$ sudo gem install rake
/usr/local/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/