Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Mongrel dies with variable as first word in string

#133

Gibberish:

In the lang.yml file if I have a line like:

message: {named} person

Then mongrel dies a death with the attached output (mongrel.txt).

However if I change the above line to

message: a {named} person

Then it works fine, I am assuming having an interpolated variable first

is causing some troubles. Then again I am not a rails expert and may be

missing something.

Running latest version of mongrel, edge rails (7837) and the latest

released version of Gibberish.


** Starting Rails with development environment...
/usr/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 27, col 77: `named_school: {named} school #Having the variable first seems to kill mongrel' (ArgumentError)
         from /usr/lib/ruby/1.8/yaml.rb:133:in `load'
         from /usr/lib/ruby/1.8/yaml.rb:144:in `load_file'
         from /usr/lib/ruby/1.8/yaml.rb:143:in `open'
         from /usr/lib/ruby/1.8/yaml.rb:143:in `load_file'
         from /home/jeff/workspace/pallas/vendor/plugins/gibberish/lib/gibberish/localize.rb:56:in `load_languages!'
         from /home/jeff/workspace/pallas/vendor/plugins/gibberish/lib/gibberish/localize.rb:53:in `each'
         from /home/jeff/workspace/pallas/vendor/plugins/gibberish/lib/gibberish/localize.rb:53:in `load_languages!'
         from /home/jeff/workspace/pallas/vendor/plugins/gibberish/init.rb:3:in `evaluate'
          ... 39 levels...
         from /home/jeff/workspace/pallas/vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in `require'
         from /home/jeff/workspace/pallas/vendor/rails/railties/lib/commands/server.rb:39
         from script/server:3:in `require'
         from script/server:3

Reported by Arj · October 18th, 2007 @ 05:36 AM

State: resolved
Milestone: none
Assigned to: Chris Wanstrath Chris Wanstrath

Activity

  1. Chris Wanstrath
    Chris Wanstrath
    • State changed from new to resolved

    Yeah, this is a limitation of YAML I didn't know about. Not much I can do about it aside from writing my own mini-YAML parser.

    Here is a workaround:

    message: "{named} person" 
    

    Note the quotes.

    Any suggestions are welcome! Sorry.

    October 29th, 2007 @ 12:25 PM

  2. Arj
    Arj

    Just stick the message in quotes? No problem, simple solution.

    Thanks

    ArJ

    November 8th, 2007 @ 06:34 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.