0

While integrating backgroundrb-rails3 I get the following error,

~/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:148:in `parse': couldn't parse YAML at line 8 column 22 (Psych::SyntaxError)
from ~/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:148:in `parse_stream'
from ~/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:119:in `parse'
from ~/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:106:in `load'
from ~/.rvm/gems/ruby-1.9.2-p290/gems/backgroundrb-rails3-1.1.6/lib/backgroundrb/bdrb_config.rb:27:in `read_config'
from ~/workspace/artbee/Trunk/script/load_worker_env.rb:25:in `<top (required)>'
from ~/.rvm/gems/ruby-1.9.2-p290/gems/packet-0.1.15/bin/packet_worker_runner:25:in `require'
from ~/.rvm/gems/ruby-1.9.2-p290/gems/packet-0.1.15/bin/packet_worker_runner:25:in `initialize'
from ~/.rvm/gems/ruby-1.9.2-p290/gems/packet-0.1.15/bin/packet_worker_runner:47:in `new'
from ~/.rvm/gems/ruby-1.9.2-p290/gems/packet-0.1.15/bin/packet_worker_runner:47:in `<top (required)>'
from ~/.rvm/gems/ruby-1.9.2-p290/bin/packet_worker_runner:19:in `load'
from ~/.rvm/gems/ruby-1.9.2-p290/bin/packet_worker_runner:19:in `<main>'

I found a similar question in stack overflow and the accepted answer works for me.

I don't want to use Syck, how can i fix it with Psych? Is there any difference in yml format for both? As the backtrace is not pointing to any yaml file, how can i debug more?

Any help is highly appreciated...

Community
  • 1
  • 1
nkm
  • 5,844
  • 2
  • 24
  • 38
  • 1
    What is the YAML in question? – Jordan Running Nov 02 '11 at 18:20
  • @jordan,I am afraid I don't know which Yaml file the error is pointing to. What I have is the backtrace, that I posted above. – nkm Nov 02 '11 at 18:32
  • Your app should have a `config/backgroundrb.yml` file that you could post? Otherwise, it may be the default one (in which case I don't see any issues with the default one at https://github.com/mtylty/backgroundrb-rails3/blob/master/config/backgroundrb.yml) – Dylan Markow Nov 02 '11 at 18:36

1 Answers1

1

Ok, it looks like Psych can't parse this specific line from the default configuration:

:trigger_args: */5 * * * * * *

Wrapping the conditions in quotes should fix it:

:trigger_args: "*/5 * * * * * *"

You can copy the default config into your config folder and make this change there. Here is the exact file to use: https://raw.github.com/mtylty/backgroundrb-rails3/master/config/backgroundrb.yml

Dylan Markow
  • 123,080
  • 26
  • 284
  • 201