Ten Things Every New Rails Developer Should Know

So, it’s been about a year and half since I started developing in Ruby on Rails. Along the way, I’ve learned a few things the hard way that I’d like to share. These are things that will just make your life a lot easier:

  1. Develop Rails apps on a Mac – Practically every Rails developer develops on a Mac. That means that pretty much every tutorial was written on a Mac. Of course there’s nothing wrong with developing Rails on Windows (I’m thinking of a famous Seinfeld episode here), however, you’re already going to have a steep enough learning curve without having to tweak every other example or tutorial for a Windows machine. Besides, you can only get Textmate on a Mac, which is the subject of my next bit of advice.
  2. Use Textmate – Textmate is the de facto editor for Rails. Again, pretty much every Rails developer I’ve come across uses Textmate and there’s a good reason for it: Textmate comes with a great Rails bundle. You don’t need all the bells and whistles of an IDE – they just get in your way.
  3. Host your first application on a virtual server slice – don’t go the cheap way (like I did) and sign up with a shared web hosting provider. Besides the performance problems you’ll have a hard time using a deployment tool like Capistrano. Get a server slice instead from a service provider like Slicehost that allows you to setup you’re own OS, web server, application server, Ruby and Rails environment, mail service, logging etc. It’s more work initially but it will give you far more flexibility and save you time down the road.
  4. Learn to use a version control system like Git and use a central repository like GitHub – When you’re learning Rails you’ll try a lot of things and then you’ll want to undo everything you just did. That’s where a version control system comes in: it tracks all the changes you make and let’s you either undo or “commit” those changes. A version control system also let’s you branch off different versions and is necessary when more than one person is working on a project. Github makes it easy to share you app with others and gives you an offsite backup.
  5. Learn how to deploy your application to a production server early – even if it’s just the standard “Welcome to Rails!” screen, you’ll save a lot of time down the road when your ready to put your real app into production. Learn and use Capistrano – it lets you roll back changes if something goes awry. BuildingWebApps has great screencasts on deploying an application using Github and Capistrano.
  6. Get at least two books in both online and paperback form – the two books I recommend are Agile Web Development with Rails, Third Edition and Programming Ruby, A Pragmatic Programmers Guide, both by the Pragmatic Programmers. You’ll have these books opened up beside you all the time. There are other great books too: Ruby by Example, Concept and Code is an awesome book for learning ruby step-by-step. But in my view the Pragmatic Programmers books are the “bibles” you can’t live without. Besides, they’re a great publisher.
  7. Buy a 10-pack of screencasts from Peepcode – this excellent series of screencasts will help you to learn Textmate, basic and advanced Rails skills, Git and so on. You’ll definitely need more than one so take advantage of their volume discount. There’s also Railscasts that are 5 to 10 minute free screencasts with a new subject every week. These amazing railscasts will keep your skills honed to a sharp edge.
  8. Start a Rails-related blog – Even if for no other reason then to track your progress and share ideas. Although it is time consuming, posting to a blog is a super way to learn Rails. Don’t bother writing or installing your own blog using Rails (unless you can’t think of any better Rails app to work on). Use WordPress or one of the biggies. Again, it’s hard enough learning Rails and finding time to write blog entries without having to worry about blog setup, hosting, spam, and blog upgrades and maintenance.
  9. Subscribe to a good Rails forum With all of the resources listed above you should be able to handle 99% of the problems you’ll run into, but when you’re really stuck, there’s nothing like a good Rails forum to turn to. I use railsstudio@yahoogroups.com. You may have to be a Rails Studio Alumni to subscribe, however, you can get practically any question answered in 24 hours or less. There are other great forums as well.
  10. Have fun! – Enjoy learning Rails because it is a lot of fun. Don’t get sucked into the stupid debates about which programming language is better than the next, or whether the framework is headed in the right direction. Just focus on learning and building your skills.

I hope this advice will help to set you on the right path from the get go. Now go and build so awesome web apps!

– Chris

Advertisements

3 comments so far

  1. Nick Hoffman on

    #s 3-6,9 and 10 are good tips. I agree with #1’s “don’t use Windows”, but don’t agree that one should only use Mac OS. GNU/Linux is just as good of a development environment for Rails apps, and it will mimic your staging and production environments more closely than Mac OS.

    For #2, I wouldn’t go as far as saying “only use TextMate”. How about “use a full-featured editor, such as TextMate, Emacs, ViM, etc”?

    For #6, why bother having a paper version of each book? Softcopies are much more useful because you can search through them with ease, as well as copy and paste text.

  2. Chris Schmitt on

    Nick, thanks for your comment. Yes, I agree that Linux would work just as well, as well as Emacs etc. The point of my article is that if your starting from scratch the choices I suggest will make your life easier, but it’s certainly not the only choice.

    For me, I like the paper version of a few books to read when I don’t have my Mac readily available, i.e. on the bus, at the breakfast table, in bed, especially the ones I need to read 6 times before it starts to sink in. But 90% of books are soft copies – I’m a huge fan of Apress’s Deal of the Day and I really like PragProgrammer’s beta book program (in fact I just downloaded their latest RSpec book 🙂

    – Chris

  3. Troy Gaylord on

    Good list. I really do need to get going with #5.
    I’d also have to say that while I do like TextMate I’ve found that for learning, the “Goto Definition” option in NetBeans is quite valuable. Being able to hold down the Command key and click a method name and having it take you to to the methods definition is a very powerful feature. Makes for a good way to learn. I tend to read the code and comments for Rails and other plugins/gems before I go to external documentation.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: