{"id":1081,"date":"2017-12-11T12:56:40","date_gmt":"2017-12-11T17:56:40","guid":{"rendered":"http:\/\/bluegalaxy.info\/codewalk\/?p=1081"},"modified":"2017-12-11T13:39:00","modified_gmt":"2017-12-11T18:39:00","slug":"ruby-on-rails-how-to-install-ruby-on-windows","status":"publish","type":"post","link":"https:\/\/bluegalaxy.info\/codewalk\/2017\/12\/11\/ruby-on-rails-how-to-install-ruby-on-windows\/","title":{"rendered":"Ruby on Rails: How to install Ruby on Windows"},"content":{"rendered":"<p>This article has instructions for installation of Ruby on Windows 10.<\/p>\n<p>1. Go to the Ruby downloads page and click the &#8220;Download&#8221; button:<br \/>\n<a href=\"https:\/\/www.ruby-lang.org\/en\/downloads\/\">https:\/\/www.ruby-lang.org\/en\/downloads\/<\/a><\/p>\n<p>2. Click the Ruby Installer link which should take you here:<br \/>\n<a href=\"https:\/\/rubyinstaller.org\/\">https:\/\/rubyinstaller.org\/<\/a><\/p>\n<p>3. Click the Download button, which leads here: (or skip the first two steps and go straight here!)<br \/>\n<a href=\"https:\/\/rubyinstaller.org\/downloads\/\">https:\/\/rubyinstaller.org\/downloads\/<\/a><\/p>\n<p>4. Since I have a 64bit machine, I am installing the 64bit version:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" id=\"img_ds\" class=\"alignnone size-full wp-image-1084\" src=\"http:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/ruby_installers.jpg\" alt=\"\" width=\"282\" height=\"246\" \/><\/p>\n<p>Once the installer is downloaded, run the .exe. In my case it was called \u201crubyinstaller-2.4.2-2-x64.exe\u201d.<\/p>\n<p>5. In the last step of the install, keep the checkbox checked for installing the sdk before clicking \u201cFinish\u201d. After clicking the Finish button, a command window will open that looks like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" id=\"img_ds\" class=\"alignnone wp-image-1086 size-full\" src=\"http:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/ruby_installer2.jpg\" alt=\"\" width=\"584\" height=\"325\" srcset=\"https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/ruby_installer2.jpg 584w, https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/ruby_installer2-300x167.jpg 300w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/p>\n<p>Press Enter to install all three. This step will install quite a few ruby modules.<\/p>\n<p>6. Confirm the installation.<\/p>\n<p>There should be an irb (Interactive Ruby) command prompt that came with the installation. In this command prompt, create a method called hello and then call it:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" id=\"img_ds\" class=\"alignnone wp-image-1088 size-full\" src=\"http:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/ruby_hello_world.jpg\" alt=\"\" width=\"303\" height=\"186\" srcset=\"https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/ruby_hello_world.jpg 303w, https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/ruby_hello_world-300x184.jpg 300w\" sizes=\"auto, (max-width: 303px) 100vw, 303px\" \/><\/p>\n<p>In Atom (or other web IDE that supports Ruby), create a test.rb file and type in:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"ruby\">#!\/usr\/bin\/ruby -w\r\n\r\nputs \"Hello, Ruby!\"\r\n<\/pre>\n<p>Then call the file to be run in a windows command prompt like so:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" id=\"img_ds\" class=\"alignnone wp-image-1091 size-full\" src=\"http:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/call_ruby_script.jpg\" alt=\"\" width=\"519\" height=\"111\" srcset=\"https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/call_ruby_script.jpg 519w, https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/call_ruby_script-300x64.jpg 300w\" sizes=\"auto, (max-width: 519px) 100vw, 519px\" \/><\/p>\n<h5><strong>Alternatively<\/strong><\/h5>\n<p>Ruby can be installed using the railsinstaller, which will also install rails, gem, and bundler tools. Start here:<br \/>\n<a href=\"http:\/\/railsinstaller.org\/en\">http:\/\/railsinstaller.org\/en<\/a><\/p>\n<p>Download the latest Windows installer :<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" id=\"img_ds\" class=\"alignnone wp-image-1095 size-full\" src=\"http:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/rails_installer.png\" alt=\"\" width=\"238\" height=\"447\" srcset=\"https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/rails_installer.png 238w, https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/rails_installer-160x300.png 160w\" sizes=\"auto, (max-width: 238px) 100vw, 238px\" \/><\/p>\n<p>Once downloaded, run the .exe, which in my case was called &#8220;railsinstaller-3.4.0.exe&#8221;.\u00a0 When the installation completes, a Windows command window will pop up that looks something like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" id=\"img_ds\" class=\"alignnone wp-image-1096 size-full\" src=\"http:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/rails_install_cmd.jpg\" alt=\"\" width=\"574\" height=\"304\" srcset=\"https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/rails_install_cmd.jpg 574w, https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/rails_install_cmd-300x159.jpg 300w\" sizes=\"auto, (max-width: 574px) 100vw, 574px\" \/><\/p>\n<p>Then confirm that the installation was successful by opening the Git Bash tool and typing in the following commands, one at a time:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\">ruby -v\r\nrails -v\r\ngem -v\r\nbundler -v<\/pre>\n<p>For example:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" id=\"img_ds\" class=\"alignnone wp-image-1097 size-full\" src=\"http:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/git_bash_rails_confirm.jpg\" alt=\"\" width=\"415\" height=\"262\" srcset=\"https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/git_bash_rails_confirm.jpg 415w, https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/git_bash_rails_confirm-300x189.jpg 300w\" sizes=\"auto, (max-width: 415px) 100vw, 415px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article has instructions for installation of Ruby on Windows 10. 1. Go to the Ruby downloads page and click the &#8220;Download&#8221; button: https:\/\/www.ruby-lang.org\/en\/downloads\/ 2. Click the Ruby Installer link which should take you here: https:\/\/rubyinstaller.org\/ 3. Click the Download button, which leads here: (or skip the first two steps and go straight here!) https:\/\/rubyinstaller.org\/downloads\/ &hellip; <a href=\"https:\/\/bluegalaxy.info\/codewalk\/2017\/12\/11\/ruby-on-rails-how-to-install-ruby-on-windows\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Ruby on Rails: How to install Ruby on Windows<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[75],"tags":[76],"class_list":["post-1081","post","type-post","status-publish","format-standard","hentry","category-ruby-on-rails","tag-ruby"],"_links":{"self":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts\/1081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/comments?post=1081"}],"version-history":[{"count":10,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts\/1081\/revisions"}],"predecessor-version":[{"id":1099,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts\/1081\/revisions\/1099"}],"wp:attachment":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/media?parent=1081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/categories?post=1081"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/tags?post=1081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}