{"componentChunkName":"component---src-templates-post-template-js","path":"/ror-on-windows","webpackCompilationHash":"9f9b08718447f3d4e396","result":{"data":{"markdownRemark":{"id":"49f178a7-fae8-53bf-b5da-e46e4cc9155d","html":"<p>Don’t get me wrong, I still think that working on a Unix based system is the best way to go for this server development environments since I’m almost sure that the code will be running in some Linux distro at production.</p>\n<p>But being able to play with code in my windows pc is still helpful! Sometimes you just want to throw some code and play with it at that moment, and switching OS/computers may now be suitable always.</p>\n<p>And if you want to teach someone to code, it’s going to be way painless to the newcomers to just stick with their OS (and for my students that is windows 99% of the time)</p>\n<p>Development with rails on windows in 2020 is surprisingly easy, way faster than it was in the past, and the setup experience (with the LTS versions) is smooth.</p>\n<h2 id=\"how-to---first-steps\"><a href=\"#how-to---first-steps\" aria-label=\"how to   first steps permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>How to - First steps</h2>\n<p>First, you will need to install some dependencies to get started with your development environment.</p>\n<ol>\n<li>Download a good text editor like <a href=\"https://code.visualstudio.com/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">VS Code</a> or <a href=\"https://www.sublimetext.com/3\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Sublime Text</a></li>\n<li>Download and install <a href=\"https://git-scm.com/download/win\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">git for windows</a>. You will be using the git bash terminal from it! while installing stick with the default options.</li>\n<li>Download and install <a href=\"http://nodejs.org/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">node.js for windows</a> (in the last step of the installer you can opt-in to install some extra dependencies like chocolatey and python, 3 birds in one shot)</li>\n<li>Download and install <a href=\"https://classic.yarnpkg.com/en/docs/install/#windows-stable\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">yarn</a> which is the package manager for javascript that Rails is using nowadays.</li>\n</ol>\n<p>Now we are ready to start with the ruby magic!</p>\n<p>Download version <a href=\"https://rubyinstaller.org/downloads/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Ruby+Devkit 2.6.6-1 (x64)</a> from RubyInstaller. <strong>Don’t download a newer version</strong> unless it is in bold fonts and with an arrow on the left of the name. The version with those indicators is the stable one, and for windows, you <strong>need</strong> maximum compatibility. A newer version may work, but some gems are still not updated for windows+latest ruby version (like nokogiri, at the time of the writing).</p>\n<p>While installing, click next and stick with the defaults. The last step will start a bash console where you are prompted to select one of the 3 options. Since this is your first installation, press 1 and then Enter </p>\n<p><img src=\"https://i.imgur.com/oubn6uR.png\"></p>\n<p>Now let’s install rails 6 like you always do: <code class=\"language-text\">gem install rails</code></p>\n<p>And that’s it!</p>\n<p>Just a few gems may depend on libraries that don’t play nice with windows all the time, so it’s not a perfect solution, but for my day to day use cases, it works excellent! (and there’s a lot of support from the community at StackOverflow and relatives GitHub issues)</p>\n<p>Hack a nice day.</p>","fields":{"slug":"ror-on-windows","tagSlugs":["/tag/ror-on-windows/","/tag/ruby-on-windows/","/tag/rails/","/tag/windows/","/tag/ruby-installer/"]},"frontmatter":{"date":"2020-05-07T00:37:04.931Z","description":"After several iterations on wsl2, different configurations and workarounds, I decided to move to a just windows approach, which surprisingly works wonders","tags":["ror on windows","ruby on windows","rails","windows","ruby installer"],"title":"Ruby on Rails on Windows (and without wsl2)","socialImage":null}}},"pageContext":{"isCreatedByStatefulCreatePages":false,"slug":"ror-on-windows"}}}