#133 ✓resolved
Arj

Mongrel dies with variable as first word in string

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

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

Comments and changes to this ticket

  • Chris Wanstrath

    Chris Wanstrath October 29th, 2007 @ 12:25 PM

    • 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.

  • Arj

    Arj November 8th, 2007 @ 06:34 PM

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

    Thanks

    ArJ

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket

Tags

Pages