Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ceedling new YourNewProjectName + ceedling test:all gives error #815

Closed
parrotrueper opened this issue Sep 26, 2023 · 7 comments
Closed

Comments

@parrotrueper
Copy link

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?

@mvandervoord
Copy link
Member

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.

@parrotrueper
Copy link
Author

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.

@kozmotronik
Copy link

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.

@mvandervoord
Copy link
Member

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

@kozmotronik
Copy link

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
Copy link

kozmotronik commented Jan 2, 2024

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!

@mvandervoord
Copy link
Member

Awesome! I'm glad it resolved your issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants