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

misc/ruby_internals.rb:225:in `initialize': No such file or directory #14

Open
pjmartorell opened this issue Sep 30, 2021 · 3 comments
Open

Comments

@pjmartorell
Copy link

I'm getting this error after installing ruby 3.0.2 and running bundle exec rake test, it seems a tempfile is not being found:

> bundle exec rake test
/Users/pere/.rbenv/versions/3.0.2/bin/ruby -I lib misc/build-ruby-internals.rb 9b8c3
/Users/pere/code/tenderjit/misc/ruby_internals.rb:225:in `initialize': No such file or directory @ rb_sysopen - /private/var/folders/f7/sm33z6_s2hn5m_2wv8034ws40000gn/T/ruby-build.20210930231444.90464.AqRNEa/ruby-3.0.2/ast.o (Errno::ENOENT)
	from /Users/pere/code/tenderjit/misc/ruby_internals.rb:225:in `open'
	from /Users/pere/code/tenderjit/misc/ruby_internals.rb:225:in `block in each_object_file'
	from /Users/pere/code/tenderjit/misc/ruby_internals.rb:224:in `each'
	from /Users/pere/code/tenderjit/misc/ruby_internals.rb:224:in `each_object_file'
	from /Users/pere/code/tenderjit/misc/ruby_internals.rb:154:in `each_compile_unit'
	from /Users/pere/code/tenderjit/misc/ruby_internals.rb:100:in `process'
	from /Users/pere/code/tenderjit/misc/ruby_internals.rb:367:in `get_internals'
	from misc/build-ruby-internals.rb:431:in `<main>'
rake aborted!
Command failed with status (1): [/Users/pere/.rbenv/versions/3.0.2/bin/ruby...]
/Users/pere/code/tenderjit/Rakefile:43:in `block in <top (required)>'
/Users/pere/.rbenv/versions/3.0.2/bin/bundle:23:in `load'
/Users/pere/.rbenv/versions/3.0.2/bin/bundle:23:in `<main>'
Tasks: TOP => test => compile => lib/tenderjit/ruby/9b8c3/constants.rb
(See full trace by running task with --trace)
@Thomascountz
Copy link

A colleague and I had this same issue using ruby 3.0.2 installed via rbenv.

I switched to using chruby and installing 3.0.2 using ruby-install and now, I no longer have this issue; I'm able to run the tests successfully.

I'm not sure if there's a more straightforward solution. I haven't dug into the specifics of why this works yet (I've only ever used rbenv and RVM before), but I saw @tenderlove's setup during this online event and I attempted to more closely replicate his by switching installation/version management tools.

@pjmartorell
Copy link
Author

Thanks @Thomascountz for your hints, I investigated a bit more and I saw that rbenv passes the following flags when compiling ruby (see https://github.com/rbenv/ruby-build/blob/e3909413561b85c80ddc3bb05949a38d8ec65114/share/ruby-build/3.0.2#L2). I guess ruby-install uses different flags or paths. I tried to install ruby with rbenv changing some of the flags but I was not able to make it work anyway.

@zzeligg
Copy link

zzeligg commented Oct 1, 2021

I experience the same error with ruby 3.0.2 installed via rbenv/ruby-build.

I was able to make it work with by installing ruby 3.1.0-dev with rbenv/ruby-build and using that version.

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