Open your web browser and go to NetBeans.org. Once there, click on the Download NetBeans IDE link.
You'll be presented with a matrix of different versions of the NetBeans IDE and which languages and features they represent. Either the Ruby version or the All version will work for Rails development. However, the option that includes other languages is a rather large download, so be aware before selecting it.
Click the download link for the version you've chosen.