6 things to try in Rails this year

It seems that blog posts in the first couple of weeks of the new year (happy new year by the way) follow the “x things to do this year” meme as a virtual homage to new years resolutions. Never one to buck a trend, I have prepared this short list of things you should try in Ruby and in Rails – I hope to cover each topic in more detail over the next couple of weeks.

  1. Install Rails: This is aimed at those of you out there that haven’t tried Ruby on Rails yet. Jump in – have a go, there are plenty of resources out there, and it is fairly easy to install regardless of your platform
  2. Upgrade to Rails 2.0: I have covered what’s new in Rails 2.0 in a number of my previous posts, and upgrading isn’t really THAT difficult if you follow the steps and fix any deprecation notices.
  3. Write a plugin: Plugins allow you to re-use common patterns without having to resort to the dreaded cut-and-paste keys. Rails has a built in plugin generator that gives you the skeleton code, all you need to do is to mix-in the right modules – oh, and write the code…
  4. Try out RESTful routes: RESTful Rails have been around for a while now, but many of the tutorials around the net are still CRUD based, so if you are a Rails beginner, you might not have tried them out yet.
  5. Use Ruby as your scripting language: Because Rails does such an excellent job of doing the hard work, it is very likely that you have never had to manually connect to a database or read the contents of a directory or performed other mundane tasks in Ruby. If you have to do any scripting, instead of PERL or Python, use Ruby – it will help you better understand the nuances of the language.
  6. Refactor your code the Ruby way: If you have come from other C-like languages (such as PHP or Java) you would
    be used to the idioms from that style of coding. Try refactoring your code to use blocks instead of for loops, or using inline if statements – you can squeeze a lot into one line in Ruby, see how far you can push it. Again, this is a great exercise to learn the language.

Go on, try them out – the new year is a great time to try something new!

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • WingMan

    Hi, Myles

    Why don’t you add some links to your list to help make it actionable? For example, linking to the rails download page or a tutorial for installing rails, or linking to a RESTful tutorial.

    That would help us n00bs to use this list as a reference point in learning more about ruby and rails.

  • madpilot

    Hi Wingman,

    Yeah, I’ll be writing a follow up post with a tutorial in the next week or too, so don’t fret too much. It’ll have all the links in it.

  • http://www.dotcomwebdev.com chris ward

    links would be extremely handy :)

  • Jim Neath
  • madpilot

    Thanks Jim, those links are great.

  • Fenrir2

    Another thing to try: Hobo. http://hobocentral.net/
    Allows you to create apps even faster. You define the models and wow, there you have a fully functional site. A few tweaks here and there and you’re finished.

  • http://www.panesofglass.org/ aranwe

    You can also try Ryan Bates’ Railscasts. He covers pretty well everything mentioned above in short, easy-to-follow installments.