Ruby on Rails Development with Microsoft Windows 10

Episode #132 by Teacher's Avatar David Kimura

Summary

Developing a Ruby on Rails application on Windows can be difficult, but doesn't have to be with Bash on Windows. Learn how to use Bash to install the Ruby interpreter.
development rails 8:05

Resources

Summary

# Installing RVM
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
\curl -sSL https://get.rvm.io | bash -s stable
source /home/$(whoami)/.rvm/scripts/rvm 
rvm install 2.5.1

# Installing NodeJS
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs

# Creating Code Folder and Alias
cd /mnt/c/Users/$(whoami)
mkdir Code
vi ~/.bashrc
alias cc="cd /mnt/c/Users/$(whoami)/Code"

# Installing Rails
gem install rails
rails new testapp
rails new testapp -d mysql # with MySQL


For MySQL, you will also need to install mysql-server and libmysqlclient-dev.

# Terminal
sudo apt install mysql-server libmysqldev-client