Skip to content

Trouble Running for the First Time #2

@Zackery

Description

@Zackery

Hello, I'm trying to setup Twitch logging. I configure the config.yaml file and I run ./stats_twitch.rb. Once doing so, I get the error.

./stats.rb:278:in `initialize': No such file or directory @ rb_sysopen - /home/Stats/twitch/#timmac.log (Errno::ENOENT)
        from ./stats.rb:278:in `open'
        from ./stats.rb:278:in `<main>'

So, understandable, I create the folder and log file. Once done, I run the program again, which results in

./stats_twitch.rb:348:in `at': can't convert nil into an exact number (TypeError)
        from ./stats_twitch.rb:348:in `<main>'

Troubleshooting, I discovered the database file isn't being created by the script, so I create a database.json file, and put {} in it's contents. Doing this results in

./stats_twitch.rb:282:in `block in <main>': undefined method `has_key?' for nil:NilClass (NoMethodError)
        from ./stats_twitch.rb:280:in `each'
        from ./stats_twitch.rb:280:in `<main>'

From here, I'm not sure what to do. Assistance would be appreciated, thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions