Not at RailsConf

I’m spending a little bit of my spare time right now trying to learn Ruby, and Ruby on Rails. I recently finished a course in Web Application Architecture on Coursera, which used Rails as part of a general overview of modern web apps.

And now I’m working on Michael Hartl’s Rails Tutorial book. The book is free to read online. I’m enjoying it so far, and getting a lot out of it.

Meanwhile, RailsConf 2015 is going on right now, in Atlanta. I should keep an eye on that on Twitter, and see if anything interesting comes up that might be useful for a guy who’s new to Rails.

more fun with Ruby

I’ve been making good progress through The Book of Ruby this week. I’ve continued to use the simple Ruby install on my ThinkPad, since it’s working fine, and I don’t yet need any of the fancy stuff; I’m still just working my way through language basics.

But I stumbled across an interesting class on Coursera that was just starting up, called Web Application Architectures, which covers Ruby on Rails. Initially, I resisted the urge to sign up for it, since I don’t think I’m really ready to start messing with Rails yet, but my curiosity got the best of me, and I went ahead and registered for it.

So now I’m messing with the somewhat arcane process of setting up Rails. Initially, I looked at trying to get Rails to work with my existing Ruby install on the ThinkPad, but (to make a long story short) that didn’t work out. So I looked at a couple of other options for installing a Rails dev environment on Windows, including RailsInstaller and RailsFTW, but I had some problems with both of them and decided to go a different way, rather than try to resolve the issues. (Finding pages like this and this on Reddit pretty much convinced me that setting up Rails on a Windows machine was a bad idea.)

So I went ahead and installed Ubuntu 14.04 under VirtualBox and followed the instructions found here to set up Rails. That seems to have gone smoothly, but I won’t really know for sure until I’ve done some meaningful work. I’m still not entirely sure if I’m going to stick with it, or punt on the course for now and avoid the messy complications of Rails until I have a better grounding in basic Ruby, but I’m going to spend some more time on it this weekend and see how it goes.

Oh, and as a side note, it’s fun to be messing with Linux again. I haven’t really touched Linux in a while. Ubuntu was fairly easy to set up under VirtualBox, and it seems to be running fine. The desktop UI is attractive and reasonably fast, even in a VM with only 1.5 GB of RAM allocated to it. (I’ll probably have to bump that up to 2 GB if I get serious about the Rails stuff.)

Learning Ruby

I’ve always been curious about Ruby, but never got around to learning it. I was inspired to actually dive in and start learning it recently, after listening to a Hanselminutes podcast where Scott Hanselman interviewed the creator of Ruby, Yukihiro Matsumoto, aka “Matz”. After messing around with SharePoint recently, I was in the mood to work on something as different as possible from that. Something where I could just install a nice little interpreter, and start working, without having to worry about spending a whole day setting up a VM first. Ruby sounded pretty good, on that front. The community seems to be pretty friendly, and there’s lot’s of good training material out there.

After looking around for a good place to start, I settled on The Book of Ruby. The publisher had a Pi Day sale this weekend, so I got the book/ebook combo for a good price. For a development environment, I’m using Komodo IDE. which I bought some time ago, for PHP work. It works OK for Ruby too, though I think there are probably better options. (But it’s good enough for now.) For Ruby itself, I installed it on my ThinkPad using the Ruby Installer for Windows, which was simple and straightforward. I also have Ruby installed on my Mac, apparently by default, since I don’t remember ever installing it myself. But I’ve decided to use the ThinkPad for my Ruby work for now, for a few reasons (bigger screen and keyboard, mostly).

I’m finding that The Book of Ruby is pretty well-written and organized, with good sample programs, at least so far, where the material is pretty basic. (I’m about 20% of the way through the book.) One slight annoyance though is that the sample code, as downloaded from the web site, is not formatted according to the usual Ruby standards. There are actual tab characters in the files rather than spaces, and the indentation isn’t always consistent. That might not seem like a big thing, but it bothers me a bit. So that set me off on a search to find a good code formatter for Ruby. Komodo doesn’t have one built in, but their web page on how to set up a new formatter links to a specific tool that looked like it work work well. Unfortunately, I found that it would always delete the last line of any code file I fed through it. This is probably due to some specific weirdness with the sample code from this book, and not a general problem, but regardless, I can’t really use that formatter. So that set me off on a search that led me to Rubocop, which is a static code analyzer that happens to also include a code formatter. That works great, though I haven’t tried to integrate it with Komodo yet.