<?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>DEV Community: hugomatinho</title>
    <description>The latest articles on DEV Community by hugomatinho (@hugomatinho).</description>
    <link>https://dev.to/hugomatinho</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%2F345847%2F78850831-235c-43b0-a768-47a47b7d851c.jpeg</url>
      <title>DEV Community: hugomatinho</title>
      <link>https://dev.to/hugomatinho</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hugomatinho"/>
    <language>en</language>
    <item>
      <title>Setting up elixir for mac (with erlang observer working)</title>
      <dc:creator>hugomatinho</dc:creator>
      <pubDate>Thu, 01 Apr 2021 12:33:39 +0000</pubDate>
      <link>https://dev.to/hugomatinho/setting-up-elixir-for-mac-with-erlang-observer-working-17pg</link>
      <guid>https://dev.to/hugomatinho/setting-up-elixir-for-mac-with-erlang-observer-working-17pg</guid>
      <description>&lt;p&gt;The erlang observer tool is a fantastic tool for elixir developers to have in their toolbelt, unfortunately the default elixir install on Mac OS Big Sur is broken (actually it's one of the dependencies &lt;em&gt;wxmac&lt;/em&gt; which is broken).&lt;/p&gt;

&lt;p&gt;if you want to fix it and have it as sexy as the one below ;) read along&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frinppwu904upk0dqblyt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frinppwu904upk0dqblyt.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This post serves as a memory refresher for later installs and also to help anyone searching to solve this, hopefully it's detailed enough, let me know in the comments if anything isn't as accurate as it should be and feel free to share your insights as well.&lt;/p&gt;

&lt;h1&gt;
  
  
  What we are going to do
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;Modify &lt;em&gt;wxmac&lt;/em&gt; &lt;/li&gt;
&lt;li&gt;Clean up previous elixir/erlang install if any&lt;/li&gt;
&lt;li&gt;Install elixir &lt;em&gt;properly&lt;/em&gt; with asdf&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Modify wxmac
&lt;/h2&gt;

&lt;p&gt;Pop open a terminal window and insert the following command (I'm assuming you use homebrew on a mac and that you use vscode but YMMV)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;HOMEBREW_EDITOR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;code
brew edit wxmac
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;you'll need to change the version, the hash and the args, check the diff file below&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;



&lt;p&gt;With wxmac properly modified if you already have an elixir setup we will need to clear it, if not, skip the next section and let’s proceed to install it properly&lt;/p&gt;

&lt;h2&gt;
  
  
  Remove previous elixir setup (skip if you have never ever setup elixir previously)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew uninstall elixir
brew uninstall erlang
brew uninstall wxmac
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Install it properly (feel free to update the versions)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--build-from-source&lt;/span&gt; wxmac
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;KERL_BUILD_DOCS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"no"&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;KERL_CONFIGURE_OPTIONS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"--without-javac --with-ssl=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;brew &lt;span class="nt"&gt;--prefix&lt;/span&gt; openssl&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;CFLAGS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"-O2 -g -fno-stack-check -Wno-error=implicit-function-declaration"&lt;/span&gt;
brew &lt;span class="nb"&gt;install &lt;/span&gt;asdf
asdf plugin add erlang
asdf plugin add elixir
asdf &lt;span class="nb"&gt;install &lt;/span&gt;erlang latest
asdf &lt;span class="nb"&gt;install &lt;/span&gt;elixir latest
asdf global erlang 23.1
asdf global elixir 1.10.4-otp-23
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's all folks!&lt;/p&gt;

</description>
      <category>elixir</category>
    </item>
  </channel>
</rss>
