I recently started testing out the Ubuntu bash for Windows 10 sub-system for my Ruby and Rails work. To set up rails, I followed this guide from GoRails.com.
Everything worked yesterday. But after shutting down my PC and starting up the Ubuntu bash terminal again today, it doesn't seem to recognize ruby or rails anymore. i.e. typing ruby -v
gives me this:
The program 'ruby' is currently not installed. You can install it by typing:
sudo apt install ruby
Typing rails -v
gives me:
bash: /mnt/c/Ruby22-x64/bin/rails: ruby: bad interpreter: No such file or directory
For reference, I used the instructions from the above guide to install Ruby 2.4.0 using RVM and Rails 5.1.1. When I ran ruby -v
and rails -v
yesterday, everything worked fine.
I should note, that before testing out the Ubuntu sub-system, I've been using Ruby and Rails on Windows itself - In this case, I have Ruby 2.2.5 (64-bit) installed using an installer downloaded from here. I installed Rails on Windows by running gem install rails
on the Windows command prompt.
I am on Windows 10 Home Version 1703 (OS Build 15063.483)
source ~/.rvm/scripts/rvm
line from the guide each time you open a new shell, unless you add that your shell's initialization file.echo "source \$HOME/.rvm/scripts/rvm" >> ~/.bashrc
from here to make this command happen automatically when running the bash terminal :)