Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run a single script (YAML error) #9

Closed
maioral opened this issue Oct 3, 2011 · 5 comments
Closed

Can't run a single script (YAML error) #9

maioral opened this issue Oct 3, 2011 · 5 comments

Comments

@maioral
Copy link

maioral commented Oct 3, 2011

Everytime i try to run the script i get the following error:

$ ./foreverb_test.rb 
/Users/Leandro/.rvm/gems/ruby-1.9.2-p180/gems/foreverb-0.2.6/lib/forever/base.rb:219:in `write_config!': undefined method `load_file' for YAML:Module (NoMethodError)
    from /Users/Leandro/.rvm/gems/ruby-1.9.2-p180/gems/foreverb-0.2.6/lib/forever/base.rb:17:in `initialize'
    from /Users/Leandro/.rvm/gems/ruby-1.9.2-p180/gems/foreverb-0.2.6/lib/forever.rb:20:in `new'
    from /Users/Leandro/.rvm/gems/ruby-1.9.2-p180/gems/foreverb-0.2.6/lib/forever.rb:20:in `run'
    from ./foreverb_test.rb:4:in `<main>'

Here is the script code:

#!/usr/bin/env ruby
require 'forever'

Forever.run do
  sleep 5
end
@DAddYE
Copy link
Owner

DAddYE commented Oct 3, 2011

mmm pretty strange, you should solve this adding require 'yaml' before all.

@maioral
Copy link
Author

maioral commented Oct 3, 2011

@DAddYE thanks, but now i have a different error:

/Users/Leandro/.rvm/gems/ruby-1.9.2-p180/gems/foreverb-0.2.6/lib/forever/base.rb:220:in `write_config!': undefined method `delete_if' for false:FalseClass (NoMethodError)
    from /Users/Leandro/.rvm/gems/ruby-1.9.2-p180/gems/foreverb-0.2.6/lib/forever/base.rb:17:in `initialize'
    from /Users/Leandro/.rvm/gems/ruby-1.9.2-p180/gems/foreverb-0.2.6/lib/forever.rb:20:in `new'
    from /Users/Leandro/.rvm/gems/ruby-1.9.2-p180/gems/foreverb-0.2.6/lib/forever.rb:20:in `run'
    from foreverb_test.rb:4:in `<main>'

@maioral maioral closed this as completed Oct 3, 2011
@DAddYE
Copy link
Owner

DAddYE commented Oct 4, 2011

Problem solved?

If not try to remove ~/.foreverb and start your app.

@maioral
Copy link
Author

maioral commented Oct 4, 2011

@DAddYE, now it worked. Even without requiring yaml. Thank you! You know why this happen?

@DAddYE
Copy link
Owner

DAddYE commented Oct 4, 2011

Maybe you have got a corrupted yml file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants