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

Executable does nothing #184

Open
blackruby opened this issue May 5, 2022 · 3 comments
Open

Executable does nothing #184

blackruby opened this issue May 5, 2022 · 3 comments

Comments

@blackruby
Copy link

I'm using Windos 11 and ruby 3.0.4p208 (2022-04-12 revision 3fa771dded) [x64-mingw32]
The source file (sample.rb) has only one line:

puts 'Hello world'

When I run the file with the interpreter (ruby .\sample.rb) all is right.
Compilation is right too (ocra sample.rb) and sample.exe is generated with no erros, but when I run the generated sample.exe nothing happens (no output) . No errors, no warnings, nothing at all, only the new prompt.

@Vucius
Copy link

Vucius commented May 5, 2022

run executable via command:./sample.exe
and,I think that u would see the error

@blackruby
Copy link
Author

I run the exe via command line and there's no error message or warning. Of course, not the expected "Hello world" either.

@yvesll
Copy link

yvesll commented May 10, 2022

WIth old versions of ruby like 2.5, I do not need to manually add dlls but when I upgrade to 2.7.5, I also need to append dlls even just a "hello world" project.
You can try
ocra xxx.rb --dll ruby_builtin_dlls/libssl-1_1-x64.dll --dll ruby_builtin_dlls\libssp-0.dll --dll ruby_builtin_dlls/zlib1.dll --dll ruby_builtin_dlls/libgmp-10.dll
If this cannot solve it, maybe you can include all dlls under C:<ruby_installation>\bin\ruby_builtin_dlls.

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