<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Perafán</title>
    <description>The latest articles on Forem by Perafán (@developerafan).</description>
    <link>https://forem.com/developerafan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F463203%2Fc24bf080-ccef-4437-ad98-655d7b6d6b8a.jpg</url>
      <title>Forem: Perafán</title>
      <link>https://forem.com/developerafan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/developerafan"/>
    <language>en</language>
    <item>
      <title>Install nginx with passenger in MacOS Monterey</title>
      <dc:creator>Perafán</dc:creator>
      <pubDate>Fri, 05 Nov 2021 23:35:18 +0000</pubDate>
      <link>https://forem.com/developerafan/install-nginx-with-passenger-in-macos-monterey-2bpj</link>
      <guid>https://forem.com/developerafan/install-nginx-with-passenger-in-macos-monterey-2bpj</guid>
      <description>&lt;p&gt;Maybe if you have installed nginx and upgrade to the new macos monterrey you could have an issue starting nginx.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;objc[65203]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[65203]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;First we need to remove nginx&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew uninstall nginx # uninstall nginx-full
rm -rf /usr/local/etc/nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we should reinstall nginx&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew tap denji/nginx
brew install nginx-full --with-passenger
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Edit your nginx.confg (&lt;code&gt;/usr/local/etc/nginx/nginx.conf&lt;/code&gt;) and add the following code in the http scope:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;passenger_root /usr/local/opt/passenger/libexec/src/ruby_supportlib/phusion_passenger/locations.ini;
passenger_ruby /usr/bin/ruby;
passenger_env_var OBJC_DISABLE_INITIALIZE_FORK_SAFETY YES;

### If you're using rbenv passenger_ruby /Users/user/.rbenv/shims/ruby;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>nginx</category>
      <category>macos</category>
      <category>monterrey</category>
      <category>passenger</category>
    </item>
  </channel>
</rss>
