Eu tenho coçado a cabeça sobre este todo o dia. Estou basicamente tentando replicar a configuração que tenho em meu desktop executando 10.11 (Yosemite), onde posso executar aplicativos Rails em Vhosts em um ambiente local usando o passageiro.
Então, na nova máquina (laptop), estou executando o macOS Sierra (10.12.2), configurei o vhosts e o apache normalmente e instalei o passageiro via homebrew.
Agora, quando eu executar sudo apachectl -t
, obtenho:
httpd: Syntax error on line 539 of /private/etc/apache2/httpd.conf: Syntax error on line 1 of /private/etc/apache2/other/passenger.conf: Cannot load /usr/local/opt/passenger/libexec/buildout/apache2/mod_passenger.so into server: dlopen(/usr/local/opt/passenger/libexec/buildout/apache2/mod_passenger.so, 10): Library not loaded: /usr/local/opt/apr/libexec/lib/libapr-1.0.dylib\n Referenced from: /usr/local/opt/passenger/libexec/buildout/apache2/mod_passenger.so\n Reason: Incompatible library version: mod_passenger.so requires version 6.0.0 or later, but libapr-1.0.dylib provides version 5.0.0
Eu executei xcode-select --install
, então tudo bem. A versão das ferramentas de linha de comando é o Xcode 8.2.1.
brew info passenger
me dá:
passenger: stable 5.1.1 (bottled), HEAD
Server for Ruby, Python, and Node.js apps via Apache/NGINX
https://www.phusionpassenger.com/
/usr/local/Cellar/passenger/5.1.1 (3,738 files, 149.5M) *
Poured from bottle on 2017-01-09 at 16:05:11
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/passenger.rb
==> Dependencies
Required: pcre ✔, openssl ✔, apr-util ✔
==> Requirements
Required: macOS >= 10.7 ✔
==> Options
--without-apache2-module
Disable Apache2 module
--HEAD
Install HEAD version
==> Caveats
To activate Phusion Passenger for Nginx, run:
brew install nginx --with-passenger
To activate Phusion Passenger for Apache, create /etc/apache2/other/passenger.conf:
LoadModule passenger_module /usr/local/opt/passenger/libexec/buildout/apache2/mod_passenger.so
PassengerRoot /usr/local/opt/passenger/libexec/src/ruby_supportlib/phusion_passenger/locations.ini
PassengerDefaultRuby /usr/bin/ruby
Saída de apxs -q | fgrep -i config
APR_CONFIG=/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apr-1-config
APU_CONFIG=/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apu-1-config
ENABLED_DSO_MODULES=,authn_file,authn_core,authz_host,authz_groupfile,authz_user,authz_core,access_compat,auth_basic,reqtimeout,filter,mime,log_config,env,headers,setenvif,version,slotmem_shm,unixd,status,autoindex,dir,alias
O que parece bom. Então, onde estou indo errado?