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

Unable to convert/build to exe from ruby #161

Open
NachisGit opened this issue Apr 10, 2020 · 3 comments
Open

Unable to convert/build to exe from ruby #161

NachisGit opened this issue Apr 10, 2020 · 3 comments

Comments

@NachisGit
Copy link

Hi,

I am new to ruby. I know ocra can convert ruby files to exe but unfortunately I strucked in the error "undefined method `relative_path_from' for nil:NilClass (NoMethodError)".

I am trying to run the command

ocra C:\Ruby27\lib\ruby\gems\2.7.0\gems\anystyle-cli-1.3.0\bin\anystyle.rb --add-all-core

image
image
image

@kurapi
Copy link

kurapi commented Jul 16, 2020

I have the same problem

1 similar comment
@horrace
Copy link

horrace commented Jan 7, 2021

I have the same problem

@jmlevesque333
Copy link

I have run into the same issue with my coworker, he had the issue and I didn't from the same Git repo.
It seems to happen because for some odd reason, this: manifests = Host.exec_prefix.find_all_files(/\.manifest$/) finds two manifest files when there is actually only one, and the second one is just nil.
So this block:

manifests.each do |manifest|
  Ocra.msg "Adding external manifest #{manifest}"
  target = manifest.relative_path_from(Host.exec_prefix)
  sb.createfile(manifest, target)
end

runs twice, and on the second time fails because manifest is nil giving this log:

=== Adding external manifest C:/Ruby27-x64/bin/ruby_builtin_dlls/ruby_builtin_dlls.manifest
=== Adding external manifest

We have been able to fix it on our side by putting a check next if manifest.nil? at line 930.
I would assume reinstalling ruby could do the trick as well.

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

4 participants