Недавнее обновление OS X Mojave испортило мою среду разработки. Драгоценный камень mysql2 перестал работать из-за конфликта с openssl, и мои приложения не смогли получить доступ к базе данных. После небольшой работы я запустил их, кроме одного. Я получаю эту странную ошибку от упаковщика:
вы должны указать exec_name (ArgumentError)
Поиск в Google не очень много возвращает. Я могу найти строку кода, откуда это происходит, но я не могу определить причину. Кажется, что параметр передается неправильно. Кто-нибудь сталкивался с этой ошибкой раньше? У вас есть решение?
Я использую OS X Mojave 10.14.6, brew, apache, rbenv, Phusion Passenger, пакет 2.1.4. Первоначально я был на Ruby 2.5.1 и пробовал 2.5.2, но это не имело значения.
Вот полный вывод:
(set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
Compilation successful. The logs are here:
/var/folders/dz/w4nlmkh15zd2w58p748jqhf40000gn/T/passenger_native_support-15m6n7c.log
[passenger_native_support.bundle] successfully loaded.
Error: The application encountered the following error: you must supply exec_name (ArgumentError)
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/bundler-2.1.4/lib/bundler/rubygems_integration.rb:362:in `block in replace_bin_path'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/bundler-2.1.4/lib/bundler/rubygems_integration.rb:413:in `block in replace_bin_path'
/Users/someuser/Sites/somedomain.localhost/config/initializers/wicked_pdf.rb:38:in `<module:WickedPdfHelper>'
/Users/someuser/Sites/somedomain.localhost/config/initializers/wicked_pdf.rb:26:in `<top (required)>'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:285:in `load'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:285:in `block in load'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:257:in `load_dependency'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:285:in `load'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/railties-5.2.4.1/lib/rails/engine.rb:663:in `block in load_config_initializer'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.1/lib/active_support/notifications.rb:170:in `instrument'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/railties-5.2.4.1/lib/rails/engine.rb:662:in `load_config_initializer'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/railties-5.2.4.1/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/railties-5.2.4.1/lib/rails/engine.rb:619:in `each'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/railties-5.2.4.1/lib/rails/engine.rb:619:in `block in <class:Engine>'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/railties-5.2.4.1/lib/rails/initializable.rb:32:in `instance_exec'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/railties-5.2.4.1/lib/rails/initializable.rb:32:in `run'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/railties-5.2.4.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/2.5.0/tsort.rb:228:in `block in tsort_each'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/2.5.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/2.5.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/2.5.0/tsort.rb:431:in `each_strongly_connected_component_from'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/2.5.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/railties-5.2.4.1/lib/rails/initializable.rb:50:in `each'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/railties-5.2.4.1/lib/rails/initializable.rb:50:in `tsort_each_child'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/2.5.0/tsort.rb:415:in `call'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/2.5.0/tsort.rb:415:in `each_strongly_connected_component_from'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/2.5.0/tsort.rb:349:in `block in each_strongly_connected_component'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/2.5.0/tsort.rb:347:in `each'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/2.5.0/tsort.rb:347:in `call'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/2.5.0/tsort.rb:347:in `each_strongly_connected_component'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/2.5.0/tsort.rb:226:in `tsort_each'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/2.5.0/tsort.rb:205:in `tsort_each'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/railties-5.2.4.1/lib/rails/initializable.rb:60:in `run_initializers'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/railties-5.2.4.1/lib/rails/application.rb:361:in `initialize!'
/Users/someuser/Sites/somedomain.localhost/config/environment.rb:5:in `<top (required)>'
config.ru:3:in `require_relative'
config.ru:3:in `block in <main>'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/rack-2.0.8/lib/rack/builder.rb:55:in `instance_eval'
/Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/rack-2.0.8/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/usr/local/Cellar/passenger/6.0.4_2/libexec/src/helper-scripts/rack-preloader.rb:101:in `eval'
/usr/local/Cellar/passenger/6.0.4_2/libexec/src/helper-scripts/rack-preloader.rb:101:in `preload_app'
/usr/local/Cellar/passenger/6.0.4_2/libexec/src/helper-scripts/rack-preloader.rb:189:in `block in <module:App>'
/usr/local/Cellar/passenger/6.0.4_2/libexec/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:380:in `run_block_and_record_step_progress'
/usr/local/Cellar/passenger/6.0.4_2/libexec/src/helper-scripts/rack-preloader.rb:188:in `<module:App>'
/usr/local/Cellar/passenger/6.0.4_2/libexec/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/usr/local/Cellar/passenger/6.0.4_2/libexec/src/helper-scripts/rack-preloader.rb:29:in `<main>'
Gem env:
- RUBYGEMS VERSION: 2.7.6
- RUBY VERSION: 2.5.2 (2018-10-18 patchlevel 104) [x86_64-darwin18]
- INSTALLATION DIRECTORY: /Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0
- USER INSTALLATION DIRECTORY: /Users/someuser/.gem/ruby/2.5.0
- RUBY EXECUTABLE: /Users/someuser/.rbenv/versions/2.5.2/bin/ruby
- EXECUTABLE DIRECTORY: /Users/someuser/.rbenv/versions/2.5.2/bin
- SPEC CACHE DIRECTORY: /Users/someuser/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Users/someuser/.rbenv/versions/2.5.2/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-18
- GEM PATHS:
- /Users/someuser/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0
- /Users/someuser/.gem/ruby/2.5.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- "gem" => "--no-rdoc --no-ri"
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /Users/someuser/.rbenv/versions/2.5.2/bin
- /usr/local/Cellar/rbenv/1.1.2/libexec
- /usr/local/sbin
- /Users/someuser/.rbenv/shims
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
Запись v-хоста apache для проблемного приложения:
<VirtualHost *:80>
ServerAdmin here@there.com
ServerName somedomain.localhost
ServerAlias www.somedomain.localhost
DocumentRoot /Users/someuser/Sites/somedomain.localhost/public
PassengerRuby /Users/someuser/.rbenv/shims/ruby
ErrorLog /private/var/log/apache2/error_log
<Directory /Users/someuser/Sites/somedomain.localhost/public>
Options -Multiviews
# ^ for Apache 2.4+
Order allow,deny
Allow from all
#Require all granted
RailsEnv development
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerAdmin here@there.com
ServerName somedomain.localhost
ServerAlias www.somedomain.localhost
DocumentRoot /Users/someuser/Sites/somedomain.localhost/public
PassengerRuby /Users/someuser/.rbenv/shims/ruby
PassengerAppEnv "development"
PassengerMinInstances 1
ErrorLog /private/var/log/apache2/error_log
<Directory /Users/someuser/Sites/somedomain.localhost>
Options Indexes FollowSymLinks MultiViews
AllowOverride FileInfo Indexes Authconfig
Require all granted
</Directory>
SSLProtocol All -SSLv2 -SSLv3
SSLEngine On
SSLCertificateFile "/private/etc/apache2/ssl/somedomain.localhost/server.crt"
SSLCertificateKeyFile "/private/etc/apache2/ssl/somedomain.localhost/server.key"
</VirtualHost>```