Skip to content

Instantly share code, notes, and snippets.

@fylooi
Last active August 29, 2015 14:09
Show Gist options
  • Save fylooi/b704a26c1737d23eae0c to your computer and use it in GitHub Desktop.
Save fylooi/b704a26c1737d23eae0c to your computer and use it in GitHub Desktop.
fylooi's Rails set up on Windows

Objective

This file documents the steps required to set up a working Rails development environment on a Windows 8.1 machine.

Methods

Native development is feasible if you don't need cutting edge Ruby and gems. Windows support is second class when it comes to the latest version of a lot of gems. Some gems (eg. Unicorn) are not able to run on Windows.

Native

You will need to add the /bin directory to your PATH for every installation

Default stack:

Ruby: If Ruby 1.9.3 is adequate for your project needs:

  • RailsInstaller - Includes Git and Devkit OR If you need Ruby > 1.9.3
  • RubyInstaller - Bare Ruby installation
  • DevKit - Some gems need this to build native extensions upon installation
  • Pik - Good to have if you need to run multiple versions of Ruby

Virtualized

Parent

  • VirtualBox
  • Vagrant with rails-dev-box as the base box. We will use rsync instead of NFS to speed Vagrant up as Windows does not support NFS
  • Cygwin to provide rsync and the bash shell.
  • Note that rsync is only one way, so a separate non-rsync vagrant instance will need to be set up to make configuration changes to the virtual machine. Do not rsync a folder under \User<username> as the permissions on those folders do not allow them to be read by the guest machine.
  • Cygwin may screw up your public keys for git (fix) Getting ssh-agent to run

Child

  • Update system packages and install curl
sudo apt-get update
sudo apt-get install curl
  • RVM to manage multiple Ruby versions
curl -SSL https://get.rvm.io | bash -s stable
user$ echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment