If you have a Windows machine and would like to dabble a bit with rails development the state of affairs is not that grim

As it stands in early 2008 there are a large number of IDEs and tools you can use, getting Rails up and running is not hugely complicated.

Note, there is a one-click installer "coming up":http://rbazinet.wordpress.com/2007/12/17/whats-coming-in-instant-rails-20-and-beyond-the-road-map/ for Rails on windows. My advice is to avoid it, not because it does not or will not work, but because installing stuff manually gives you better control, and teaches you more along the way.

Get up and running

  • Install "Ruby":http://rubyinstaller.rubyforge.org/wiki/wiki.pl : Go for version 1.8.X, 1.9 was recently released but it is still a "while":http://www.postal-code.com/binarycode/2007/12/30/ruby-19-not-for-rails/ before people recommend using it for rails development.

  • Update your Gems - Ruby contains a packaging system which could be likened to a network connected version of windows installer. It manages installation and upgrades of "gems" which are re-usable components. Rails itself is just a collection of gems. Early in the release cycle of Rails 2.0 there was an issue with the Gem system that caused lots of woes installing Rails. To avoid any issues in future just run the following command (from the command line). It will update the gem gem :slightly_smiling:

gem update --system

  • Install Rails - note: gems may depend on other gems, using the include dependencies command allows rails to update all of the dependent gems.

gem install rails --include-dependencies

That's it Rails is installed, you can now create your first hello world app.

  • If you would like a more "unix-like" development environment - try "cygwin":http://www.cygwin.com/ it can co-exists side by side with a windows native ruby installation. I use cygwin to run rails plugins that do not run in windows native eg. "Backgroundrb":http://backgroundrb.rubyforge.org/

Get yourself educated

  • "Railscasts":http://railscasts.com/ : This is a fantastic podcast. It cover a very large number of Rails topics. Ryan knows his stuff and his podcasts have the perfect pace.

  • "The Rails Forum":http://www.railsforum.com/ : If you get stuck, someone here will be happy to answer your questions.

  • "The Rails Wiki":http://wiki.rubyonrails.org/rails : Another excellent resource about everything and anything involving rails.

  • "Agile Web Development with Rails":http://www.pragprog.com/titles/rails2 : Watch out for th Rails 2 version of this book, it has been a critical resource during my rails development.

  • "Rails CHM documentation":http://delynnberry.com/projects/rails-chm-documentation : A very useful resource.

Get yourself tooled up

  • "Console":http://sourceforge.net/projects/console : In Rails you will spend a fair amount of time on the console, this is a fantastic cmd replacement, it supports a tabbed interface, and you don't have to jump through hoops to resize the window.

  • "Firebug":https://addons.mozilla.org/en-US/firefox/addon/1843 : probably the best javascript debugger out there, its very handy when debugging rails apps

  • "YSlow":http://developer.yahoo.com/yslow/ : A very useful plugin for firefox (which requires firebug). It will help you optimize your web apps.

Choose an IDE

  • "Aptana":http://www.aptana.com/ (free): My current IDE of choice, its based of "Eclipse":http://www.eclipse.org/ . It has a ton of features, and is fairly fast to load up. My current biggest gripe is that cut-and-paste seems a little slow, it is highly customizable and support everything from debugging to refactoring. I love the CSS support in Aptana.

  • "NetBeans":http://www.netbeans.org/ (Free) : A very capable IDE which, like Aptana, is written in Java. I found its load time a bit slow, and I seem to like the look and feel of Aptana a bit better. It support pretty much all the feature that Aptana does, and has a superior intellisense implementation.

  • "JEdit":http://www.jedit.org/ (Free) : (With the ruby "plugin":http://plugins.jedit.org/plugins/?RubyPlugin) Used it for a while and found it rough around the edges. Support intellisense, Rails and most of the features the Java based IDEs.

  • "Vim":http://www.vim.org/download.php#pc (Free) - With the Rails plugin":http://wiki.rubyonrails.org/rails/pages/HowtoUseVimWithRails . It has a steep learning curve but is, by far, one of the most powerful rails IDEs (coupled with rails.vim)

  • "FreeRIDE":http://freeride.rubyforge.org/wiki/wiki.pl (Free) - It's written in Ruby and has little to no special Rails support, a very basic fast multi-platform IDE.

  • "Ruby.Net Visual Studio Integration Package":http://rubydotnet.googlegroups.com/web/VisualStudioIntegration.htm#Installing (Free) - I have not used this yet, it does look ok. Has a lengthy setup process and no special Rails support.

  • "SciTE":http://scintilla.org/SciTE.html (Free) - Ships with the Windows Ruby installer. More information about customizing it "here":http://caladbolg.net/scite.php . I use it to edit single ruby files, but it does not have the same amount of features the other Java based IDEs have. It is lightning fast though.

  • "InType":http://intype.info/home/index.php (free while in alpha): This IDE is still in alpha (it does not even have a file browser at the moment), it looks very promising and very similar to "TextMate":http://macromates.com/ which is the IDE the Ruby on Rails team use.

  • "E-TextEditor":http://www.e-texteditor.com/ ($34.95): This is a TextMate clone for windows, it works best if you have Cygwin installed.

  • "Arachno Ruby IDE":http://www.ruby-ide.com/ruby/ruby_ide_and_ruby_editor.php ($49) - I have not used this, it does not support rails natively.

  • "Ruby in Steel":http://www.sapphiresteel.com/ ($49 - $199) - A plugin for Visual Studio (that now also ships stand alone). It supports a very large amount of features, including intellisense and debugging. I have it installed at the moment, but tend to use Aptana.

Hope this helps someone out there, let me know if I missed anything or should expand


Zac over 9 years ago

Hi Sam, Congrats on the new blog and thanks for the this post – very comprehensive.

<p>You might want to check the linked headers of the posts though…</p>

<p>I read the posts through my google reader and when I click on one of your posts headers to open it in a new tab – the location is local “http://localhost:3000/posts.rss” for this post &amp; “http://localhost:3000/posts/4” for the “nice <span class='caps'><span class='caps'><span class='caps'>GUI</span></span></span> profiler for SqlLite (Profiler released to the public” post”…</p>

Sam Saffron over 9 years ago
Sam Saffron

Thanks Zac,

<p>I think the <span class='caps'>RSS</span> and Atom feeds are sorted now.</p>

<p>That will learn me to write my own blog engine :)</p>
Zac over 9 years ago

works perfectly now :)

Niels over 9 years ago

Heya Sam!

<p>I ran into your blog because of the keywords BackgroundRB and Windows in one sentence ;-) So I am wondering which version of BackgroundRB did you manage to work on Windows? ‘Unfortunately' I am currently working on a Rails app which requires Windows and I was thinking about using BackgroundRB for some stuff, until I read that it wasn't working. So, I hope to hear it!</p>

<p>Thanks in advance,</p>

<pre><div class='CodeRay'>

- Niels

Sam Saffron over 9 years ago
Sam Saffron

Hi Niels,

<p>I managed to get the 1.0.1 or 1.0.2 background rb running under cygwin, I think it required some compilation and some libraries, but from what I recall it was pretty easy. (unlike beanstalkd which I could not get working under cygwin)</p>

<p>So, I guess the first step would be to install cygwin with all the dependencies backround rb will need, then install ruby under cygwin and then install the backgroundrb plugin. Watch out, from what I recall there  is a very old version of backgroundrb lurking around, which you want to avoid.</p>

<p>I have not tested running rails under windows native and backroundrb under cygwin, but I do believe it should work, since the forking is done in the service and the comms is multiplatform.</p>

<p>I didn't test on 1.0.3  which looks like the most recent, but I do believe it should work. I can not try it out at the moment cause I moved my dev box to linux. It seems backgroundrb is getting quite a bit of dev time at the moment.</p>



Klaus almost 8 years ago

I am completely new to Rails. I first question is: What web/application server is rails using? Is it tomcat? Do I have to install it first?



Sam Saffron almost 8 years ago
Sam Saffron

you could use tomcat and jruby if you really wanted to. in general people use passenger and apache

Teo_Fleming almost 6 years ago

This is just me being my inner OCD self, but Apatana's free price is not Capitalized. Also, JEdit's Free price is not in bold.

Great article! Thanks for the help!

comments powered by Discourse