Ask A Question

Notifications

You’re not receiving notifications from this thread.

Ruby Colorize Error Help

Lea Kamoun asked in General

To whom it may concern,

Hello!
I have come to use Ruby because of this following blog: https://sleepdata.org/blog/fixing-invalid-edf-dates

However, I have been getting the following error (In the image below) for colorize. I am not sure why and have looked at other forums that suggested that the version of Ruby might be why I have the error.

I currently have Ruby 2.7.4. I had previously owned Ruby 3.0.2. Unfortunately, I still have the same errors/result. Are there any ideas/opinions to how to fix this error?
Thank You!

Reply

My apologize, the picture can not be pasted onto the forum, here is what the image contained:

Traceback (most recent call last):
4: from rewrite_signal_date.rb:12:in <main>'
3: from D:/LEA_FOLDER/Programs/Ruby27-x64/lib/ruby/gems/2.7.0/gems/edfize-0.6.0/lib/edfize.rb:77:in
edfs'
2: from D:/LEA_FOLDER/Programs/Ruby27-x64/lib/ruby/gems/2.7.0/gems/edfize-0.6.0/lib/edfize.rb:77:in each'
1: from D:/LEA_FOLDER/Programs/Ruby27-x64/lib/ruby/gems/2.7.0/gems/edfize-0.6.0/lib/edfize.rb:78:in
block in edfs'
rewrite_signal_date.rb:18:in block in <main>': undefined methodcolorize' for " OK":String (NoMethodError)
Did you mean? colorless

Reply

Sounds like you need the colorize gem: https://github.com/fazibear/colorize

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 81,842+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2024 GoRails, LLC. All rights reserved.