Ceedling: Ceedling not working with Ruby 3.2.2

I did a fresh install of Ceedling, and it is incompatible with Ruby 3.2.2.

ceedling example temp_sensor
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/ceedling-0.31.1/bin/ceedling:12:in `<top (required)>': undefined method `exists?' for File:Class (NoMethodError)

  project_found = File.exists?(main_filepath)
                      ^^^^^^^^
Did you mean?  exist?
        from C:/Ruby32-x64/bin/ceedling:32:in `load'
        from C:/Ruby32-x64/bin/ceedling:32:in `<main>'

I tried making changes manually in the ceedling Ruby files, but there’s only so many things I can fix without breaking other things in a codebase and a language I know nothing about. And I am also finding it difficult to downgrade Ruby.

I do understand that Ceedling is compatible with Ruby 2.something and that it cannot be made compatible with the latest Ruby release. My request is to kindly include the specific instruction to install the compatible Ruby version in the tutorial at your website and where to download it from. And if possible, also instructions on how to downgrade to the correct Ruby version.

Thanks in advance.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 30 (12 by maintainers)

Commits related to this issue

Most upvoted comments

Or you google and find this issue which clearly states there is a problem.

I had exact same error with Ruby 3.2. It seems to be due to the use of exists? method, which is deprecated. I think that since ruby 3.2 only the exist? one is recognized.

For those unfamiliar with Ruby gems, here is the step-by-step to fix the issue:

  1. go to the Code tab in this repo.
  2. On the right side of the screen, select “Releases”.
  3. 0.32.0-xxxxxxx -> open Assets under the latest “Pre-release”
  4. Download the ceedling-0.32.0-xxxxx.gem
  5. Use: gem install --local path_to_gem/filename.gem

That fixed my issue with the “undefined method ‘exists’”

I would like to second that gem install ceedling which installs ceedling 0.31.1 for me on Windows 11 does not work with Ruby 3.2.2. Until this issue is fixed, I request the README be modified accordingly and/or a check added to Ceedling to check for version compatibility.

I have put lots of effort in writing my testcases its unfortunate that Ceedling is broken with Ruby 3.2.0, And the amount of attention that this issue is given is quite low. Ill have to downgrade my Ruby installation, its too frustrating. The statement REQUIRED RUBY VERSION: >= 2.4.0 is just misleading! How unfortunate for such a great tool.

Im facing the same issue. I installed as suggested the pre-release version, to be precise i installed 0.32.0-c67c010 , but its still broken. When can we expect a fix? ruby vendor\ceedling\bin\ceedling clobber vendor/ceedling/bin/ceedling:12:in <main>‘: undefined method `exists?’ for File:Class (NoMethodError)

project_found = File.exists?(main_filepath)

                  ^^^^^^^^

Did you mean? exist?`

eedling version Welcome to Ceedling! Calling DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)’ has been deprecated. Please call DidYouMean.correct_error(error_name, spell_checker)' instead. Ceedling:: 0.32.0 CMock:: 2.5.4 Unity:: 2.5.4 CException:: 1.3.3 ruby -v ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x64-mingw-ucrt]