I've been wanting to try Ruby for a while and thought I'd share how to get up and running with Ruby and Ruby on Rails on Linux. 2 things that stood out to me when reading up about Ruby development were:
1. Develop on Linux or OSX if you can. This Stackoverflow post highlights some of the challenges of Ruby/Rails in Windows. I prefer to run Linux in a virtual machine but that's just my preference.
2. Install Ruby using RVM (Ruby Version Manager) instead of apt. More information about RVM can be found on the official RVM (Ruby Version Manager) website.
Install ruby and reload bash profile
Confirm Ruby is installedYou should see an output similar to below:
Turn off ri and rdoc generationI like to turn off ri and rdoc generation when installing gems. You can do this by creating a .gemrc file in your home directory and adding the below:
Install Rails (this can take a while)
Create a test application and start it up
If you get the below error:
If you received no error, you should be able to navigate to your application in a browser (http://0.0.0.0:3000/) and see the rails welcome page.