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

Possible error: No such file or directory @ rb_sysopen - C:/home/x/programming/ruby/src/roebe/bin/fiber.so (Errno::ENOENT) #186

Open
rubyFeedback opened this issue Aug 15, 2022 · 1 comment

Comments

@rubyFeedback
Copy link

rubyFeedback commented Aug 15, 2022

I am trying to turn one of my commandline executable, in ruby, via ocra
on windows into a standalone application.

The project's name is roebe and it is also on rubygems.org.

I start in the directory:

C:\home\x\programming\ruby\src\roebe\bin>

Ok. Next thing I do is this:

ocra roebe

That file exists under bin/ and I am in that directory. You can check that
it is also part of the roebe gem as-is by the way, so the file 100% exists.

Some output follow next after doing "ocra roebe":

=== Loading script to check dependencies
=== Detected gem error_highlight-0.3.0 (loaded, files)
===     0 files, 0 bytes
=== Detected gem did_you_mean-1.6.1 (loaded, files)
===     0 files, 0 bytes
=== Detected gem ocra-1.3.11 (loaded, files)
===     5 files, 271800 bytes
=== Detected gem yaml-0.2.0 (loaded, files)
===     0 files, 0 bytes
=== Detected gem stringio-3.0.1 (loaded, files)
===     0 files, 0 bytes
=== Detected gem psych-4.0.3 (loaded, files)
===     0 files, 0 bytes
=== Detected gem strscan-3.0.1 (loaded, files)
===     0 files, 0 bytes
=== Detected gem forwardable-1.3.2 (loaded, files)
===     0 files, 0 bytes
=== Detected gem fileutils-1.6.0 (loaded, files)
===     0 files, 0 bytes
=== Detected gem date-3.2.2 (loaded, files)
===     0 files, 0 bytes
=== Detected gem time-0.2.0 (loaded, files)
===     0 files, 0 bytes
=== Including 61 encoding support files (3763712 bytes, use --no-enc to exclude)
=== Building roebe.exe
=== Adding user-supplied source files

Ok so far so fine.

Now comes the error:

C:/ruby/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:1188:in `initialize': No such file or directory @ rb_sysopen - C:/home/x/programming/ruby/src/roebe/bin/fiber.so (Errno::ENOENT)
    from C:/ruby/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:1188:in `open'
    from C:/ruby/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:1188:in `createfile'
    from C:/ruby/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:898:in `block (2 levels) in build_exe'
    from C:/ruby/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:882:in `each'
    from C:/ruby/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:882:in `block in build_exe'
    from C:/ruby/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:1087:in `block in initialize'
    from C:/ruby/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:1071:in `open'
    from C:/ruby/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:1071:in `initialize'
    from C:/ruby/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:879:in `new'
    from C:/ruby/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:879:in `build_exe'
    from C:/ruby/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:1231:in `block in <top (required)>'

This is super confusing. Why would ocra look at a file called fiber.so in the CURRENT working directory?
That is super-weird. Also, it should check whether such a file exists, and then gracefully exit or
notify the user. Right now it seems to not even do a "File.exist?" check or something. But I don't
know the internals well enough to comment. I just think it is odd that it tries to query fiber.so from
the current working directory. I am in the bin/ directory of my own gem, why should any .so file
be there? That makes no sense to me. Can it be that ocra is doing some wrong file query or
path query and gets confused in the process?

@Vucius
Copy link

Vucius commented Aug 29, 2022

look at this

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

2 participants