I followed the latest Mac OS installation instructions- no errors during installation, but when I run script/server the web (unicorn) doesn’t start. I use mysql as db and apache for web server. I got certificates from Let’s Encrypt.
Not sure what I’m missing, I couldn’t get much from the error messages. I enabled debug for scripts/master and unicorn and I see unicorn is complaining it can’t get configs.
lots of errors for all kind of parameters. Below are the few lines from stderr.log
Exception NameError' at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/psych/class_loader.rb:68 - uninitialized constant BigDecimal ExceptionNameError’ at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/psych/core_ext.rb:17 - method to_yaml' not defined in Object ExceptionNameError’ at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/psych/core_ext.rb:30 - method yaml_as' not defined in Module ExceptionNameError’ at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/psych/deprecated.rb:82 - undefined method to_yaml_properties' for classObject’
Exception `Configurate::SettingNotFoundError’ at /Users/diaspora/diaspora/vendor/bundle/ruby/2.3.0/gems/configurate-0.3.1/lib/configurate/provider.rb:12 - The setting heroku was not found
It turns out unicorn is not starting up properly with -D, so I updated config/eye.rb to start it normally and then demonize as if in development mode
if rails_env == "production"
# start_command "#{unicorn_command} -D" # << cemented out
# daemonize false # << commented out
start_command unicorn_command. # << new line
daemonize true # << new line
restart_command "kill -USR2 {PID}"
restart_grace 10.seconds
else
start_command unicorn_command
daemonize true
end
There’s on more thing, ‘nproc’ is not available on Mac OS X, and script/configure_bundler will fail. You can update it by replacing ‘nproc’ with ‘sysctl -n hw.ncpu’