cnorthwood / eurovisionhue

Make Philips Hue take the colour of the Eurovision country that's currently on
MIT License
19 stars 4 forks source link

Dockerfile not working #31

Open martincostello opened 4 months ago

martincostello commented 4 months ago

I use Windows, and trying to run the scripts natively in WSL was giving me a load of pain, so I thought I'd try the Dockerfile instead.

However, when I run it I just get an error in the lights gem:

bundler: failed to load command: lights (/usr/local/bundle/bin/lights)
/usr/local/bundle/gems/lights-1.0.2/bin/lights:13:in `initialize': undefined method `exists?' for File:Class (NoMethodError)

    if File.exists? LIGHTS_CONFIG_PATH

Hopefully it's something simple, but I'm just following the steps in the README and it's getting me nowhere.

cnorthwood commented 4 months ago

hmm, I fixed that earlier today. I wonder if it's cached the old code because that line of code has changed it. I wonder if you need to re-run the docker build?

martincostello commented 4 months ago

I only forked things in the last hour or so, so my clone should be up-to-date.

I did try rebuilding things, but I'll try clearing the cache and doing it again.

martincostello commented 4 months ago

Yeah, same error with docker build --no-cache -t eurovisionhue .

cnorthwood commented 4 months ago

weird - although I've realised that that code is in the lights library rather than my library (I rename FIle.exists? to File.exist? https://github.com/cnorthwood/eurovisionhue/blob/master/eurovisionhue.rb#L91). I wonder if you have the base Docker image to an older Ruby version that'd still work?

martincostello commented 4 months ago

I'll try changing the tag on the base image to something older and see what happens.

martincostello commented 4 months ago

I've gotten it working by changing the base image to FROM ruby:3.0 🥳