However that is not unfortunately always possible. Stumbling along learning on your own is tough, and frankly not much fun. Thankfully, I recently discovered a way that everyone can have their own virtual built in Ruby mentor! :-)
Wouldn't it be nice if someone could help you with proper code indentation?
Wouldn't it be nice if a friend could point out "bad" coding habits right away, like unused variables?
Wouldn't it be nice if someone looked over your shoulder and not only showed you the "ruby way" to code, but would actually change the code for you, if you wanted???
This isn't a scam I will show you how to make all these wishes come true!
From your command line ( also called the terminal ) run this command:
'sudo gem install rubocop'
you will be prompted for your computer's admin password.
Install the 'rubocop' Sublime Text 3 plugin using package control on Sublime Text 3. If you don't have Sublime Text 3 installed I highly recommend it. Here's a link to Sublime Text 3.
Now install 'sublime linter' plugin, just as we did before. We will then install the 'ruby lint' plugin from Sublime's package control.
Finally we will install 'beautify ruby' using package control as before. That is all you need installed to have your own built in virtual mentor! In the video below I will show you how these 3 packages can become an amazing coding mentor. Using these 3 coding tools you will be able to code faster and have 50% less coding 'bugs'.
In the video I show how to turn off some code warnings that you don't want by making a rubocop.xml file and configuring it.
I will also show you how to check for errors from the command line using 'rubocop'. Also how to automatically correct all of those errors!
Lastly I will show you how to customize the Sublime user package settings to automatically format your code every time you save the file :-)
Keep coding peeps, you can do this!