This project is read-only.
2

Closed

"ir script\server" causes a YAML parser error

description

Running "ir script\server" in Rails 2.3.2 throws a IronRuby::StandardLibrary::Yaml::ParserException when trying to load the config/locals/en.yml file.

comments

jimmysch wrote Apr 10, 2009 at 9:42 PM

This issue is due to symbols in an array.

Repro: http://gist.github.com/93280/

require 'yaml'
YAML::load('date: [ :year, :month, :day ]')

c:\dev\codeplex-375>rbx -D repro.rb
c:\dev\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\Yaml\IronRuby.Libraries.Yaml\Engine\Parser.cs:251:in `Produce': while scanning a flow node: expected the node content, but found: #<ValueToken> (IronRuby::StandardLibrary::Yaml::ParserException)
    from c:\dev\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\Yaml\IronRuby.Libraries.Yaml\Engine\Parser.cs:115:in `ParseStreamNext'
    from c:\dev\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\Yaml\IronRuby.Libraries.Yaml\Engine\Parser.cs:99:in `PeekEvent'
    from c:\dev\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\Yaml\IronRuby.Libraries.Yaml\Engine\Composer.cs:94:in `ComposeNode'
    from c:\dev\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\Yaml\IronRuby.Libraries.Yaml\Engine\Composer.cs:112:in `ComposeNode'
    from c:\dev\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\Yaml\IronRuby.Libraries.Yaml\Engine\Composer.cs:40:in `ComposeDocument'
    from c:\dev\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\Yaml\IronRuby.Libraries.Yaml\Engine\Composer.cs:130:in `GetNode'
    from c:\dev\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\Yaml\IronRuby.Libraries.Yaml\Engine\BaseConstructor.cs:92:in `GetData'
    from c:\dev\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\Yaml\IronRuby.Libraries.Yaml\Engine\BaseConstructor.cs:314:in `MoveNext'
    from :0:in `load'
    from repro.rb:2

wrote Apr 10, 2009 at 9:43 PM

wrote Apr 10, 2009 at 11:45 PM

wrote Apr 11, 2009 at 12:23 AM

Update: The YAML parser is incorrectly parsing a symbol inside an array as a "ValueToken", rather than a "ScalarToken", as it recognizes it as a "ScalarToken" when outside an array ...

wrote Apr 12, 2009 at 3:11 AM

jimmysch wrote Apr 12, 2009 at 3:17 AM

Fix for this: http://github.com/jschementi/ironruby/commit/e8406f60c9426f4b675bf67180c24f2bb5b0f609

Pending review for move to ironruby/ironruby.git

wrote Apr 20, 2009 at 2:34 AM

wrote May 20, 2009 at 9:54 PM

shobazee wrote Mar 22, 2010 at 8:45 PM

The scaffold command above generated a migration in db/migrate/<timestamp>_create_posts.rb to create a "posts" table with "title", "body", and "published" fields. Run the migration to commit it to the database. <a href="http://www.seozip.com">SEO packages</a> . <a href="http://www.traveliota.com">adult travel</a> . <a href="http://www.easymud.com">Auctions> . <a href="http://www.datelot.com">free dating</a> . <a href="http://www.ekjodi.com">Indian Matrimony</a>

wrote Feb 22, 2013 at 12:41 AM

wrote May 16, 2013 at 12:05 PM