Ceedling icon indicating copy to clipboard operation
Ceedling copied to clipboard

ceedling new YourNewProjectName + ceedling test:all gives error

Open parrotrueper opened this issue 2 years ago • 7 comments

Ubuntu jammy sudo apt-get install ruby-full sudo gem install ceedling ceedling new broken-seed cd broken-seed

ceedling test:all /var/lib/gems/3.0.0/gems/ceedling-0.31.1/bin/ceedling:327:in load': cannot load such file -- /usr/local/bin/ceedling/lib/ceedling.rb (LoadError) from /var/lib/gems/3.0.0/gems/ceedling-0.31.1/bin/ceedling:327:in <top (required)>' from /usr/local/bin/ceedling:25:in load' from /usr/local/bin/ceedling:25:in <main>'

Any ideas?

parrotrueper avatar Sep 26 '23 12:09 parrotrueper

It's possible you are about to run into further problems because of having "too new" of a Ruby. They've made breaking changes that we've had to catch up with. There is a release candidate gem under releases that you can manually install.

I don't believe that's the error you're seeing right now, though.

It appears that it's not finding the gem when your local version calls back to it. If you repeat your experiment with a small change, does this work for you:

ceedling new another-project --local
cd another-project

I'm not saying this is the way you're going to want to run it... but it's a good experiment to see if it's the forwarding portion that is broken. The --local is the opposite of --as-gem which forces it to run directly out of the gem. It appears that it's not figuring out properly where your gem is running from (perhaps because of symlink wonkiness?) so I'm suggesting we try to run the local version and see how it goes.

mvandervoord avatar Sep 26 '23 14:09 mvandervoord

Yes if I pollute my project tree it works.

You guessed correctly, I would rather have the tools installed system-wide rather than in the project folder.

parrotrueper avatar Sep 26 '23 15:09 parrotrueper

Hi @mvandervoord!

The latest stable version (0.31.0) of Ceedling is not really working with the recent versions of Ruby. We would be appreciated if you could release a new stable version of Ceedling that catch up those breaking changes of Ruby.
For example, I am trying install and make use of Ceedling. I've created a project using the ceedling new <Project> command and it worked. However when I execute ceedling help command, I get Unknown alias error like the following:

$ ceedling help
/usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:432:in `visit_Psych_Nodes_Alias': Unknown alias: common_defines (Psych::BadAlias)
from /usr/lib/ruby/3.0.0/psych/visitors/visitor.rb:30:in `visit'
from /usr/lib/ruby/3.0.0/psych/visitors/visitor.rb:6:in `accept'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:35:in `accept'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:340:in `block in register_empty'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:340:in `each'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:340:in `register_empty'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:148:in `visit_Psych_Nodes_Sequence'
from /usr/lib/ruby/3.0.0/psych/visitors/visitor.rb:30:in `visit'
from /usr/lib/ruby/3.0.0/psych/visitors/visitor.rb:6:in `accept'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:35:in `accept'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:347:in `block in revive_hash'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:345:in `each'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:345:in `each_slice'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:345:in `revive_hash'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:169:in `visit_Psych_Nodes_Mapping'
from /usr/lib/ruby/3.0.0/psych/visitors/visitor.rb:30:in `visit'
from /usr/lib/ruby/3.0.0/psych/visitors/visitor.rb:6:in `accept'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:35:in `accept'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:347:in `block in revive_hash'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:345:in `each'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:345:in `each_slice'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:345:in `revive_hash'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:169:in `visit_Psych_Nodes_Mapping'
from /usr/lib/ruby/3.0.0/psych/visitors/visitor.rb:30:in `visit'
from /usr/lib/ruby/3.0.0/psych/visitors/visitor.rb:6:in `accept'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:35:in `accept'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:320:in `visit_Psych_Nodes_Document'
from /usr/lib/ruby/3.0.0/psych/visitors/visitor.rb:30:in `visit'
from /usr/lib/ruby/3.0.0/psych/visitors/visitor.rb:6:in `accept'
from /usr/lib/ruby/3.0.0/psych/visitors/to_ruby.rb:35:in `accept'
from /usr/lib/ruby/3.0.0/psych.rb:334:in `safe_load'
from /usr/lib/ruby/3.0.0/psych.rb:369:in `load'
from /usr/lib/ruby/3.0.0/psych.rb:671:in `block in load_file'
from /usr/lib/ruby/3.0.0/psych.rb:670:in `open'
from /usr/lib/ruby/3.0.0/psych.rb:670:in `load_file'
from /home/kozmotronik/.local/share/gem/ruby/3.0.0/gems/ceedling-0.31.1/bin/ceedling:278:in `<top (required)>'
from /home/kozmotronik/.local/share/gem/ruby/3.0.0/bin/ceedling:25:in `load'
from /home/kozmotronik/.local/share/gem/ruby/3.0.0/bin/ceedling:25:in `<main>'

I've tried installed older versions of ruby like 3.0.6 and 2.7.8 using the rbenv but no avail, still getting the same error.

kozmotronik avatar Jan 02 '24 18:01 kozmotronik

If you go to "Releases" here on github, you can find Release Candidates which already fix this (and many other) issues. We are working through some documentation (we believe we've already covered all the breaking changes, however) and verifying some of the lesser-used plugins still work, etc. before releasing. You can, however, still download one of the candidates and install is using gem install --local filename

mvandervoord avatar Jan 02 '24 19:01 mvandervoord

Oh, I wasn't expecting an answer that fast!

Thank you @mvandervoord. Could you please elaborate how can I install the release candidate using the gem command? Thank you very much!

kozmotronik avatar Jan 02 '24 19:01 kozmotronik

Never mind @mvandervoord I figured it out now. Sorry, I am new to Rubies and gems thing 😄 .

I've downloaded and installed the ceedling-0.32.0-d76db35.gem using the command you indicated:

gem install --local ceedling-0.32.0-d76db35.gem

Now yes it works with the recent versions of ruby. Thank you very much for your help and for your nice work!

kozmotronik avatar Jan 02 '24 19:01 kozmotronik

Awesome! I'm glad it resolved your issue!

mvandervoord avatar Jan 02 '24 19:01 mvandervoord