Hello Ruby
18 Dec 2020I’ve been hearing about Ruby on Rails for some years. But I’ve been skeptical about the amount of moving parts (Magic) that are introduced by Ruby and Rails in the process of development. So this year I decided to test it out for myself in the holidays.
In 2020 I’ve built out a small Project in Laravel that handles Reseller packages and Pricing for B2B. It feels familiar coming from the Javascript side of things. I also discovered that Laravel combines ideas from JS and Ruby.
One of the Developers I follow online mentioned what they’ve been doing on Ruby and I was intrigued to take a look. Well I spent a today and learned the basics.
So far I like that Ruby is similar in it’s ability to scaffold various parts of an application. After learning how that works it no longer seems like a Ruby Project can spin out of control.
What I like
- I like how easy CRUD is with Ruby - feels like Laravel.
- The stack feels less fragmented than JS stacks do.
- The language so far seems enjoyable.
What I may have to learn to love
- Deployment of Ruby projects seem to be a bit more complicated than PHP but not so much more complicated than Node.js apps. I manage several VPS’ running production code. So It’s not insurmountable to deploy.
What I learned
- Intalling a Ruby Development environment Learned that this part of Ruby on Windows can be tricky and how to get it done.
- Ruby MVC and Project structure The Ruby project Structure is remarkably easy to understand coming from Laravel
- Routing with Ruby Routing uses
- Variables in Ruby Ruby variables are just words like in Bash unless you want to increase their scope. Variables passed from controller to page are written @variable
- Finding and Using Gems
- Defining production vs development gems
- Controllers in Ruby Controllers are
- Migrations and Databases in Ruby
- Production v.s. Development configs
- Creating CRUD forms in Ruby
- Add custom styling to Ruby elements
- Use Devise to create login and profile pages
- Database Associations
- Controllers beyond basic Crud
- Deploying Ruby code to git and Heroku
Wrap up
Getting my feet wet with Ruby has been a good experience that has broadened my thinking. I love how simple the syntax is. And I’m looking forward to use some of the insights gained in other languages.
I may just build out a next personal project in Ruby for fun.