ThrowTheSwitch / Ceedling

Ruby-based unit testing and build system for C projects
http://throwtheswitch.org
Other
583 stars 245 forks source link

Mysterious error message for missing dependency #133

Open meyercm opened 7 years ago

meyercm commented 7 years ago

I built up a fresh machine to run my CI tests (one without years of dev detritus). In order to support those tests, I ran:

gem install ceedling

My CI server sent some tests over to the machine, and even though I got a 0 return code indicating success (this is a separate bug, addressed in #117), the output told a different story:

#<Errno::ENOENT: No such file or directory - fork failed>

Some frustration, a great deal of manual testing, and an intuitive guess later, I ran gem install rake; now everything seems to be happy.

I'm recording the issue here for the rest of the internet, but I believe unhelpful_error_message == bug, so I'd recommend either auto-installing rake as a dependency, or locate the line where the rake tasks kick off, and print a useful message e.g. "Aborting: rake not installed. Try 'gem install rake'"

mvandervoord commented 7 years ago

I'm not sure how you ran into this problem. Rake IS a dependency of Ceedling. It's the second item in the gemfile (after bundler). I can't seem to reproduce this issue on any of my systems (xubuntu, os x, Windows 10, Windows 7).

Are you running a really old version of Ruby? Gems defaults to using --include-dependencies since like Ruby 1.8.9 or something like that.

meyercm commented 7 years ago

Bizarre. I was running on a Raspberry Pi 3, with a completely fresh install of raspbian. ruby --version gives ruby 2.1.5p273 (2014-11-13) [arm-linux-gnueabihf]

Feel free to close the issue; as I said before, I'm mostly recording the occurrence for the rest of the internet / my future self. Would you be open to a pull request that presents more information about the error before crashing?

mvandervoord commented 7 years ago

Hm. Maybe Rubygems is configured differently on platforms that are made to be minimal, like a Pi? I'd love to see more information. I'd much rather fix this issue than have other people reopen it later. ;)