Я искал способы превратить мое приложение Sinatra в исполняемый файл на OSX. Я нашел Ruby Packer и следовал инструкциям по установке для их Ruby компилятора под названием rubyc.
Это вывод терминала из запуска ./rubyc
в моем приложении config.ru:
Я установил глобальный Ruby на 2.6.3, используя rbenv. Я также недавно удалил каталог проекта .bundle.
Может кто-нибудь пролить свет на то, почему rubyc пытается установить гем "nil"?
tomgong@Toms-MacBook-Pro-5 secretary % ./rubyc config.ru
-> Project root not supplied, /Users/tomgong/Documents/secretary assumed.
Ruby Compiler (rubyc) v0.4.0
- entrance: /Users/tomgong/Documents/secretary/config.ru
- options: {:make_args=>"-j4", :output=>"/Users/tomgong/Documents/secretary/a.out", :tmpdir=>"/var/folders/9z/n1vv43bd1ln0y87rkrlr7xr80000gn/T/rubyc"}
...(truncated)...
-> cd /Users/tomgong/Documents/secretary
-> Running [{"CI"=>"true", "PATH"=>"/var/folders/9z/n1vv43bd1ln0y87rkrlr7xr80000gn/T/rubyc/ruby-2.4.1-0.4.0/build/bin:/Users/tomgong/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS", "GEM_HOME"=>nil, "GEM_PATH"=>nil, "ENCLOSE_IO_USE_ORIGINAL_RUBY"=>"1", "ENCLOSE_IO_RUBYC_1ST_PASS"=>"1", "ENCLOSE_IO_RUBYC_2ND_PASS"=>nil}, "gem", "install", nil, "--verbose", "--no-rdoc", "--no-ri"]
/__enclose_io_memfs__/local/lib/compiler/utils.rb:31:in `spawn': no implicit conversion of nil into String (TypeError)
from /__enclose_io_memfs__/local/lib/compiler/utils.rb:31:in `run'
from /__enclose_io_memfs__/local/lib/compiler.rb:569:in `block in prepare_local'
from /__enclose_io_memfs__/local/lib/compiler/utils.rb:45:in `block in chdir'
from /__enclose_io_memfs__/local/lib/compiler/utils.rb:45:in `chdir'
from /__enclose_io_memfs__/local/lib/compiler/utils.rb:45:in `chdir'
from /__enclose_io_memfs__/local/lib/compiler.rb:527:in `prepare_local'
from /__enclose_io_memfs__/local/lib/compiler.rb:464:in `block in run!'
from /__enclose_io_memfs__/local/lib/compiler/utils.rb:45:in `block in chdir'
from /__enclose_io_memfs__/local/lib/compiler/utils.rb:45:in `chdir'
from /__enclose_io_memfs__/local/lib/compiler/utils.rb:45:in `chdir'
from /__enclose_io_memfs__/local/lib/compiler.rb:365:in `run!'
from /__enclose_io_memfs__/local/bin/rubyc:149:in `<main>'
Gemfile. блокировка:
GEM
remote: https://rubygems.org/
specs:
activesupport (6.0.2.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
bcrypt (3.1.12)
bcrypt-ruby (3.1.5)
bcrypt (>= 3.1.3)
concurrent-ruby (1.1.6)
data_mapper (1.2.0)
dm-aggregates (~> 1.2.0)
dm-constraints (~> 1.2.0)
dm-core (~> 1.2.0)
dm-migrations (~> 1.2.0)
dm-serializer (~> 1.2.0)
dm-timestamps (~> 1.2.0)
dm-transactions (~> 1.2.0)
dm-types (~> 1.2.0)
dm-validations (~> 1.2.0)
data_objects (0.10.17)
addressable (~> 2.1)
dm-aggregates (1.2.0)
dm-core (~> 1.2.0)
dm-constraints (1.2.0)
dm-core (~> 1.2.0)
dm-core (1.2.1)
addressable (~> 2.3)
dm-do-adapter (1.2.0)
data_objects (~> 0.10.6)
dm-core (~> 1.2.0)
dm-migrations (1.2.0)
dm-core (~> 1.2.0)
dm-serializer (1.2.2)
dm-core (~> 1.2.0)
fastercsv (~> 1.5)
json (~> 1.6)
json_pure (~> 1.6)
multi_json (~> 1.0)
dm-sqlite-adapter (1.2.0)
dm-do-adapter (~> 1.2.0)
do_sqlite3 (~> 0.10.6)
dm-timestamps (1.2.0)
dm-core (~> 1.2.0)
dm-transactions (1.2.0)
dm-core (~> 1.2.0)
dm-types (1.2.2)
bcrypt-ruby (~> 3.0)
dm-core (~> 1.2.0)
fastercsv (~> 1.5)
json (~> 1.6)
multi_json (~> 1.0)
stringex (~> 1.4)
uuidtools (~> 2.1)
dm-validations (1.2.0)
dm-core (~> 1.2.0)
do_sqlite3 (0.10.17)
data_objects (= 0.10.17)
fastercsv (1.5.5)
ffi (1.11.1)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
json (1.8.6)
json_pure (1.8.6)
listen (3.2.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mini_portile2 (2.4.0)
minitest (5.14.0)
multi_json (1.13.1)
mustermann (1.0.3)
nio4r (2.5.2)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
octicons (9.1.1)
nokogiri (>= 1.6.3.1)
public_suffix (3.0.3)
puma (4.3.3)
nio4r (~> 2.0)
rack (2.2.2)
rack-protection (2.0.5)
rack
rake (13.0.1)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
require_all (3.0.0)
rerun (0.13.0)
listen (~> 3.0)
sassc (2.0.1)
ffi (~> 1.9)
rake
shotgun (0.9.2)
rack (>= 1.0)
sinatra (2.0.5)
mustermann (~> 1.0)
rack (~> 2.0)
rack-protection (= 2.0.5)
tilt (~> 2.0)
sinatra-flash (0.3.0)
sinatra (>= 1.0.0)
slim (4.0.1)
temple (>= 0.7.6, < 0.9)
tilt (>= 2.0.6, < 2.1)
stringex (1.5.1)
temple (0.8.1)
thread_safe (0.3.6)
tilt (2.0.9)
tzinfo (1.2.6)
thread_safe (~> 0.1)
uuidtools (2.1.5)
zeitwerk (2.2.2)
PLATFORMS
ruby
DEPENDENCIES
activesupport
data_mapper
dm-sqlite-adapter
json (~> 1.6)
octicons
puma
require_all
rerun
sassc
shotgun
sinatra
sinatra-flash
slim
BUNDLED WITH
2.0.2