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

Zeitwerk just doesn't work at all, truffle version 24.1.1 #3709

Closed
jmcdonagh opened this issue Nov 5, 2024 · 3 comments
Closed

Zeitwerk just doesn't work at all, truffle version 24.1.1 #3709

jmcdonagh opened this issue Nov 5, 2024 · 3 comments

Comments

@jmcdonagh
Copy link

Hi, I've got an app I'm refactoring and using zeitwerk just fine with the regular ruby 3.2.x. I've recently become very interested in truffleruby so I thought I'd check it out... so I updated RVM, installed truffle, set up a gemset and ran bundle install. That all went fine, but when I try to start the app, clearly zeitwerk isn't 'werking' cause it can't find the namespaces.

I'm not really sure how to go about debugging this but it simply doesn't work. Here is some terminal output that will show you:

[jmcdonagh@nina][truffleruby-24.1.1@boss][trailblazer:/Volumes/Code/boss][0:2.789s]
⮕  truffleruby --version
truffleruby 24.1.1, like ruby 3.2.4, Oracle GraalVM Native [arm64-darwin20]
[jmcdonagh@nina][truffleruby-24.1.1@boss][trailblazer:/Volumes/Code/boss][0:40.5ms]
⮕  bin/boss --action list
bin/boss:12:in `const_missing': uninitialized constant Boss::Cli (NameError)
Did you mean?  CGI
	from bin/boss:12:in `<main>'
[jmcdonagh@nina][truffleruby-24.1.1@boss][trailblazer:/Volumes/Code/boss][1:1.017s]
⮕  rvm use ruby-3.2.0@boss
Using /Users/jmcdonagh/.rvm/gems/ruby-3.2.0 with gemset boss
[jmcdonagh@nina][ruby-3.2.0@boss][trailblazer:/Volumes/Code/boss][0:258ms]
⮕  bin/boss --action list
The following commands are available:
...
@andrykonchin
Copy link
Member

If a recent version of Zeitwerk is used (2.7.0 or above) then it's a known issue that was reported in #3683 and is already fixed.

The fix is available in dev/head TruffleRuby builds that can be installed with RVM with the following command:

$ rvm install truffleruby-head

(more details about installing you can find here).

Could you provide a Zeitwerk version that is used?

@jmcdonagh
Copy link
Author

oh my bad i only searched OPEN issues since i just grabbed the latest release, d'oh. it is definitely the latest zeitwerk (2.7.1). It looks like rvm can't install -dev. I did but it just installed another copy of the regular one. I'm going to close this cause I bet it works with the dev one as the other ticket says, next time i'll remember to search for closed. thanks!!! nice work truffle team.

@eregon
Copy link
Member

eregon commented Nov 5, 2024

If rvm install truffleruby-head didn't work could you report it at https://github.com/rvm/rvm/ ?

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

No branches or pull requests

3 participants