pmq20 / ruby-packer

Packing your Ruby application into a single executable.
MIT License
1.56k stars 99 forks source link

Cannot find entrance #112

Open ilovemysillybanana opened 4 years ago

ilovemysillybanana commented 4 years ago

Ruby Version: ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin17] RubyC Version: 2.7.1a OS Version: MacOS Mojave 10.14.6

I've tried running like this:

/tmp/rubyc --gem=ohai --gem-version=16.2.3 --debug --tmpdir ./ .
/tmp/rubyc --gem=ohai --gem-version=16.2.3 --debug --tmpdir ./ bin/ohai

And it fails both times, because it can't find an entrance:

Successfully installed ohai-16.2.3
1 gem installed
-> cd /private/tmp/out/ohai/ruby_install_1/lib/ruby/gems/2.7.0/bin
Cannot find entrance /private/tmp/out/ohai/bin/ohai, available entrances are .
pmq20 commented 4 years ago

@ilovemysillybanana Thank you for reporting! The entrance logic has been a mess. I am in the process of cleaning it up. I am deleting the --gem* options, because the case of compiling a gem can always be reduced to compiling from a local project root directory. This makes the entrance logic easier to maintain. The new rubyc command usage will be:

Usage
  rubyc [OPTION]... [ENTRANCE_FILE]
  ENTRANCE_FILE refers to the path of an executable ruby script from your project, e.g. "bin/rails".
  If ENTRANCE_FILE was not provided, then a single Ruby interpreter executable will be produced.