How to Use AJAX With Ruby on Rails

Let’s understand why AJAX exists, so you can get a better idea of how to use it in your Rails projects. When you visit a website, what happens? A page is loaded from the server. But if you want to see new information you have to either reload the page to update it, or click … Read more

Ruby Interpreter Options & How to Use Them Correctly

A Ruby interpreter is a program that reads & runs Ruby code. But… Did you know that the default Ruby interpreter (MRI) has lots of interesting & useful command-line options? Like: ruby -v Which gives you the Ruby version you are using right now. Or the -e flag which allows you to run a bit … Read more

How to Tell Your Ruby Program to Stop Running Early

How do you stop a Ruby program early? Normally a program will run until it’s done processing all the instructions. Or until it raises an exception that doesn’t get handled. But if you’re writing a Ruby program that doesn’t need to be running all the time, you may want to stop your program early for … Read more

7 Interesting Ruby Code Examples

One way to learn new Ruby tricks, patterns & methods is to read code others have written. But where do you find interesting code worth reading? We have many open source projects, and coding challenge sites that allow you to see the solutions from other developers once you submit your own. In this article: I … Read more