15 Top Tools for a Rails Programmer
Here are my top 15 tools for rails development. I felt compelled to compose a list in an effort to help rails developers that are just starting out.
1. A mac / linux machine for development. (macports and apt-get are your friends.), with Rails 2 and Mongrel by Zed Shaw. I have not bothered to include all the individual tools on your development platform but recommend setting it up yourself as you will learn a lot and will end up with a setup which is tailored to your needs. Info for mac , Info on the rails wiki
2. A healthy collection of feeds. Ruby Inside, Err the Blog, Nubyonrails, and Riding rails. Also, new age feeds such as ruby on rails podcast, railscasts, rails envy podcast are top. Also, the peepcodes are all pretty good and if you want to learn about something in detail which is fairly meaty, they are worth the reasonable price.
3. A great editor you know inside out. The main reason I use a mac is because of the existance of textmate. Otherwise I would still be on windows. The book is a lifesaver, also this cheatsheet is very useful.
4. A shell. Instead of spending time with bloated IDE’s which take a year to load an use more RAM than a I eat waffles, spend time getting familiar with the shell. BASH is my favourite and is by far the most common. You should become familiar with the rails console commands, command line mysql, command line source control and command line filesystem commands. These take a bit of time to get used to, but are often the fastest way to do things. BASH aliases are MASSIVE time saver. Have a look at my ALIASES for some inspiration. Load them in with the following in your .bash_profile:
5. An automated deployment tool, this should really be “one-click” stuff. Capistrano is the king of the hill, with projects like Vlad the deployer following in its wake. Try and get your deployment recipies into a plugin. Here is a plugin which includes a collection of recipies (including an update basecamp recipe) which I use in my projects at iformis. deployment_recipiez
6. Sysadmin skills. At the moment rails on shared hosting aint the best. Hopefully projects like mod_rubinius will sort that. You need to be able to install a rails stack from the ground up and deploy to it. Things like backups, database setup, process monitoring etc should be familiar. I was hoping to try Ruby Works the rails stack provided by Thoughtworks. If you have had the chance please let me know what its like. In terms of cheap dedicated hosting which is reliable I recommend slicehost. If you are not yet familiar with systems administration I recommend reading a few books on the subject as it isnt something you can learn overnight. Also a good tip is to maintain a collection of scripts which you keep in source control which you can easily checkout on the different servers that you work. It is essentially a mobile server toolkit which is customized to your needs.
7. Testing is very important for your rails application. This will save time in the future. I wont harp on about the many benefits of testing but point you to TDD and BDD.
8. Zentest especially autotest which runs your tests automatically each time you save a relevant file. Linking in the Growl notifications You might also want to get this working with Rspec. If you do then.. this might be of interest.
9. Know which are the top good quality plugins out there. Keep an eye on the rss for agilwebdevelopment.com for what is new and hot. For established plugins, I recommend will_paginate, exception_notification, attachment_fu, restful_authentication and arts. I am sure you know of some more goodies!
10. Monit is a great tool for your production servers. After it is properly configured it just keeps stuff up for you and can warn you if you experience high load. It also means that if your mongrels crash for any reason you can sleep soundly in the knowledge that they will be started for you. There is an example monit configuration which you can start from if you like.
11. Firefox/Firebug: Often referred to as ruby’s ugly-cool sister, Javascript is used a lot in rails apps. You should use firebug to debug errors with AJAX calls rather than having to dig through the server logs to try and find what you are looking for! This saves a LOT of time and other features such as the CSS inspector are top notch. As a side, also thing about other firefox plugins such as LiveHTTPHeaders which are shit hot also.
12. HAML : You either love it or you hate it. I love it, well, I like it. For developing templates really quickly this is an amazing tool. However, you have to watch out for long files as it can look ugly if you are doing too much in a template. This forces you to use more partials and helper methods. These are good design practices.
13. Continuous Integration is a great technique which makes sure you dont have any broken windows in your project. Often testing on a development machine is tied too much to the environment on the development machine. Often Davey, your designer will delete an erb tag by mistake. CI involves automatically building the project after each subversion commit. Cruisecontrol.rb is your tool of choice here. As the number of projects you have configured with it grows, make sure your server has quite a bit of RAM. You can also integrate this with campfire and basecamp to use these tools as a centre to the development in your work environment.
14. SCM should probably be higher up the list but it isnt. This is because it is rubbish. No only joking, you are not one of the ‘enlightened’ if you dont use this on all your projects which have more than one file! Subversion is the defacto standard but there is a new kid on the block called Git which is really good for open source projects but maybe isnt so good for Davey the designer.
15. Javascript is a core element of rails application development. You should have a working knowledge of the language itself. You should also know what can be done with prototype and scriptaculous the javascript frameworks which ship with rails. The downside of these frameworks is the overhead. There are some fanboys of jquery which is more lightweight and apparently can do the same I recommend you check out jquery but knowledge of prototype and scriptaculous is a must. Have a look at the book on prototype or the peepcode screencast for further info.
I hope this helps you get an overview of all the main tools and sources of information in the rails development space. If you would like to point out any glaring errors or give me a pat on the back please do so in the comments.