Ruby Development on Windows
November 24, 2010
Several months ago, I set a Ruby development environment up on Windows but quickly realised that people were right saying that it doesn’t work well: I had lots of crashes, installation of some gems was tricky, and the Ruby version didn’t play well with the Rails version at that time. So I installed VirtualBox and configured everything within Ubuntu. While it did work in a way, it wasn’t a pleasant development experience at all. Installing virtual machines for testing purposes is fine but for longer working sessions I didn’t like it. First, even on a fast machine working in a virtual machine doesn’t feel as responsive and native as using a real OS. Secondly, things can get inconvenient when you want to use some tools on your OS and some on the guest system (networking modes etc.). Overall, it just makes matters much more complex than using a single system. Now, with Ruby 1.9.2 and Rails 3 I made another try and so far things have been working really well. If you plan to get started with Ruby dev on Windows, here are a few tips:
- Use Ruby installer 1.9.2 and also set up the Development kit (see the instructions in the wiki). For web development work, use the latest Ruby on Rails (version 3) or the more lightweight Sinatra framework.
- For command line work, use the latest Windows PowerShell (version 2, already included in Windows 7) and a tool for multiple tab support. PowerShell comes with a scripting environment (PowerShell ISE) that supports multiple tabs but I prefer Console. Console is a shell wrapper that you can tell to use PowerShell in the settings and to launch multiple tabs on startup.
- Use Git as your source control system and integrate it with your shell, text editor and diff tool.
- Use your favourite code editor. Basically, all major IDEs support Ruby development. Currently, I use IntelliJ which works quite well. If you like to use a free IDE you could try eclipse or NetBeans with their Ruby plugin, use Aptana RadRails or use any other text editor with Ruby syntax highlighting such as Notepad++. A text editor with Ruby support is also helpful when you don’t want to fire up your IDE for quick edits.
- Use Heroku to easily deploy and test your application online. Heroku is free up to a certain limit, so great for initial testing. Heroku also supports PostgreSQL, MongoDB via MongoHQ and many other services (Amazon S3 etc.). Another popular hosting service is Engine Yard.
Filed under: Ruby / Rails, Software Development
Add a comment
You must be logged in to post a comment.