<?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: Mingming Wang</title>
    <description>The latest articles on DEV Community by Mingming Wang (@linktoming).</description>
    <link>https://dev.to/linktoming</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%2F407205%2F03648392-fd1a-42cc-b8d0-f192a33368d8.jpeg</url>
      <title>DEV Community: Mingming Wang</title>
      <link>https://dev.to/linktoming</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/linktoming"/>
    <language>en</language>
    <item>
      <title>Set up a clean Rails development environment </title>
      <dc:creator>Mingming Wang</dc:creator>
      <pubDate>Mon, 26 Apr 2021 07:27:47 +0000</pubDate>
      <link>https://dev.to/linktoming/set-up-a-clean-rails-development-environment-3npa</link>
      <guid>https://dev.to/linktoming/set-up-a-clean-rails-development-environment-3npa</guid>
      <description>&lt;p&gt;Recently I tried to setup Solidus (a Rails engine for e-commerce) and faced tons of issues, mostly not related to Solidus but Ruby, Rails and Node environments. The following is the note on how I finally resolved all the issues faced.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;If your brew is messed up or you have used brew to install Ruby or Node, consider reinstall brew.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use brew to install git, sqlite3 and imagemagick since they are Ruby/Node agnostic and wouldn't be affected by different Ruby or Node version.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use version manager to install Ruby and Node.&lt;br&gt;&lt;br&gt;
This is because the latest version of Ruby or Nodes may not work for your scenario and you would then need to install a different version of them. Version managers make it much easier.&lt;br&gt;&lt;br&gt;
For Ruby, I used RVM since I used it before. For Node I used NVM since it switched node packages according to the current Node being used as well.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Important&lt;/em&gt;: at the time of this writing, latest Node version is not working well with my Rails setup and I have to downgrade it to Node 14. (Thanks to &lt;a href="https://dev.to/andrzejkrzywda/fixing-the-node-sass-problem-in-rails-node-downgrade-helps-16lh"&gt;https://dev.to/andrzejkrzywda/fixing-the-node-sass-problem-in-rails-node-downgrade-helps-16lh&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use gem (from current Ruby version based on RVM) to install Rails (for current Ruby version). Don't use brew to install it which would be global.&lt;br&gt;&lt;br&gt;
The Rails version installed will be according to the current gem based on the current Ruby version based on RVM.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use npm (from current Node version based on NVM) to install Yarn (for current Node version).&lt;br&gt;&lt;br&gt;
Don't use brew to install it which would be global.This is because Yarn is a node package and I used NVM to manage my node and node package accordingly. So whenever I switch my node version, Yarn will be switched accordingly as well. This may save some compatibility issue.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
  </channel>
</rss>
