I have been hard at work finishing my degree at DePaul University. My stress is up, but so are my programming skills. This semester I am taking many capstone classes, or classes that you take to “cap” your experience at college. Besides these, I am taking IT 231, a web development course that introduces an emerging and new web language: Ruby on Rails.
First, put yourself in my shoes. Knowing valid HTML, css, php, and javascript, why do I need to learn another new web language? Is it to confuse us? No way, it’s to make stuff easier.
Ruby on Rails is a high recommended web language to learn. Like PHP, Ruby on Rails is a Server-Side scripting language. The reasons for learning RoR can be very technical – without going too much into it, Ruby on Rails can be seen as a “trust me” language. There is a new sense of transparency between you and how Ruby on Rails interprets your code. In short, Ruby on Rails relies on many assumptions based on heuristics, or “rules of thumb”, used by web developers today. The language rarely gives you or your visitor(s) any error messages. Instead, the language heals itself by ignoring faulty code. You can contrast this with PHP, which gives you (and the visitors) error messages like it’s candy on Halloween.
There is no better way to learn about Ruby on Rails than to try a simple program execution. I recommend you try the following Ruby on Rails tutorial:
- First, install Ruby: https://rubyonrails.org/
- Download, extract, then run: ruby setup.rb
- After RubyGem is loaded, install Rails with: gem install rails
- In the command line enter: rails new hello
- Then change to the new directory using: cd hello
- Generate your controller (read up about this more by yourself), by entering: rails generate controller hello
- Navigate to your /hello folder and open routes.rb in your /hello/config folder. Remove the # symbol before the following code:
# match ':controller(/:action(/:id(.:format)))'
Click save. - Lastly, run the command: rails server and navigate to http://localhost:3000 in your browser!