Ruby on Rails Environment Setup on Windows 10

Windows with Ruby on Rails installed on Ubuntu Virtual Box

I am new to Ruby on Rails and I was asked to setup my Ruby on Rails local environment for work without any help from anyone. I spent a couple of weeks trying to install it on windows only to realize that there were too many gem unavailability issues in windows for the setup of the ruby application.

I tried the following before I ended up working almost completely from within a Linux Virtual Box Client.

  • Windows + Ruby + Source Code:
    • Install Ruby on Rails using the Rails installer and / or Ruby installer on Windows 10 with existing source code and gem bundles.
    • This failed because there were too many gems that were needed by the application that we were not available on windows version of Ruby.
  • Windows + (Linux Virtual Box + Ruby) + Source Code:
    • Install Ubuntu on Virtual Box. And Setup Ruby in Ubuntu while having the IDE and Source Code on Windows with the source code folder shared into the Virtual box using Guest Additions for running the WEBrick server and gem installations.
    • This failed because when doing the bundle install command from Linux Virtual Box on the shared windows source code folder failed due to permission issues.
  • Windows + (Linux Virtual Box + Ruby + Source Code):
    • Install Ubuntu on Virtual Box. And Setup your IDE, Ruby, and source code in Ubuntu. SSH into Virtual Box and access your application from your Windows Host using a host only virtual box network adapter.
    • This works for me because of the seamless mode in virtual box guest additions.
  • Ubuntu:
    • Install Ubuntu as a second OS with dual boot setup. And setup your IDE, Ruby, and source code in Ubuntu.
    • This works but doesn’t give the same comfort level or speed of development as Windows (to me).

So I am using the Windows + (Linux Virtual Box + Ruby + Source Code) setup for working with Ruby on Rails development now. I access the web application via browser on Windows and do all development on the Ubuntu virtual box using seamless mode.