Ruby on Rails 1.9.2 crashes on Windows 7 with multiple web reqeusts

RoR, Ruby No Comments »

As I’m currently without a fulltime project for a customer I’m trying to learn something completely new, Ruby on Rails. On the blog (which hasn’t been updated for years), I’ll share some pains and pleasures in this new adventure.

Ruby on Rails is probably not the best development platform to install on Windows. But my home development machine has Windows 7 installed on it, so I decided to install Ruby on Rails  on this machine instead of my Macbook Pro.

I’m building a site with some some images on a single page and the images have the src attribute pointed to a controller of the same application.

When I was developing the site, I first used Webrick as webserver, Webrick crashed a lot of times and some research on the web learned me that I should use another webserver. I decided to use Mongrel. But Mongrel also crashed, so after a few days of frustration, I decided to do some more research.

The Windows event viewer told me the following information:

Faulting application name: ruby.exe, version: 1.9.2.180, time stamp: 0x4d5ee5ed
Faulting module name: msvcrt-ruby191.dll, version: 1.9.2.180, time stamp: 0x4d5ee5ec
Exception code: 0xc0000005
Fault offset: 0x0011a00e
Faulting process id: 0x14a0
Faulting application start time: 0x01cc117a0ec2f93f
Faulting application path: c:\Ruby192\bin\ruby.exe
Faulting module path: c:\Ruby192\bin\msvcrt-ruby191.dll
Report Id: f002aeff-7d6d-11e0-b6c8-001018657acb

I copied and paste the information into Google, but nothing useful came up, I found that some people had the same problem, but there was no solution available.

I decided to downgrade my Ruby version to 1.8.7, a version which also is good enough for Rails 3 applications and the problem was gone. So it seems that there’s a problem in Ruby 1.9.2 on Windows.

I don’t have any clue what the problem is, as I’m an inexperienced RoR developer, I didn’t care to downgrade the application to 1.8.7. The frustration of crashes is gone now and I’m starting to be a happy RoR developer.

Øredev 2009- The week after

General, Productivity No Comments »

Last week, Martijn and I attended a great developers conference in Sweden, Øredev 2009. A great conference, great speakers and some awesome sessions made this a really inspiring event for me, the week after I implemented some practical ideas from the sessions.

Friday night

After the conference, I couldn’t wait to start working again and try out some new ideas which were on my mind after the conference. So the post conference flow started the moment we came back from dinner and arrived at the hotel room Friday night. The keynote of Scott Hanselman made me think about handling my e-mail. So I decided to make a bunch of mail filters/rules for my different mailboxes and these rules cleaned up my complete mailbox (and now it stays empty I hope).

The Sunday back at home I made some plans to do the upcoming week (besides some work for my current project). What were the effects of Øredev the week after?

Monday

Scott Hanselman and Neal Ford talked about productivity, efficiency and effectiveness in two seperate sessions. On monday I decided to install a few productivity tools. I was using Remember the Milk already to keep track of my tasks on the web and on my broken iPhone. Besides that I installed Evernote to track my notes in OS X, Windows 7 and when my iPhone is fixed again, I’ll install it on the iPhone to.
It seems to be a cool program to keep track of your notes and searching though images, but I can’t tell whether it will work for me or not, since I’m using it not long enough.

Another thing I noticed in the talk of Neal Ford was the use of a text substitution tool. After some searching on the web, I found Texter, a nice little program to make text snippets. With this tool I don’t need to create batchfiles with long and hard to remember commands, just create shortcuts with it.

But besides the hard to remember tasks I found out the coolest thing after installing Launchy on my Windows 7 machine. Launchy is really a great tool to quick launch your programs, but when you type a folder path, it opens windows explorer opened at the given location (it also works from the Windows 7 or Vista search bar in the start menu, so Launchy isn’t really necessary).

I noticed that I frequently need to start Windows Explorer and navigate to the Visual Studio Projects folder or my current project’s solution folder and it was really starting to irritate me.
Now I’ve created a Texter shortcut which let me type projects, press Tab and it replaces projects with the path to my projects folder, so when I open up Launchy, type projects, my Windows Explorer will open in my current projects folder. It already saved me a lot of clicking because all can be done by using the keyboard only.

In the afternoon I decided that I need a msbuild file for my current project which also zips and deploys my application to the web server and includes also the appropriate configuration files. With some custom msbuild tasks, it was pretty easy to make that happen. The file I ended up with was a pretty common file which I can use in various other projects.

So the Monday was a great day where I installed tools and created a script which allows me to work more efficient, thanks to Scott and Neal :) .

Tuesday

Ayende showed in one of his talks how to get rid of dependencies in your code, he implemented logging, caching exception handling and more by using an inversion of control container. Since I was using Castle Windsor in my current project I decided to upgrade it to the latest version and implement logging the AOP way. It was just about an hour work and it gives me valuable information about my application, just another session which gave me great ideas (the other ideas from that session will be used in  the near future).

During the rest of the day I decided to build a tool for my current project. This is a multi lingual application and people want to edit resource files in Excel (non-IT guys want to do everything in Excel). For more than a year the application had only two languages in it, so it was pretty easy to copy and paste manually the translations in the resource files and the other way around.
But in a few months there will be five or more languages in the application and it is really annoying to copy and paste all this stuff manually in all the resource files which are shared over five locations in different projects in the solution folder.

While searching the web I came across this page on code project: RESX to XLS converter, it did almost what I wanted, except it had a UI, I wanted a console application which takes two parameters, the path and the name of the Excel file to write the resources to and the path of the Visual Studio Solution where it can look for the resources to write to Excel.

I decided to take the code and made it and modify it slight so it would be a console application. In the evening I got the job done and I ended up with a tool which reads the resources from a Visual Studio Solution, writes them to Excel and does the same thing the other way around.

The code will be shared in the near future, I guess this is a pretty useful tool for other people to.

Wednesday

Wednesday I was at the clients office for some meetings and used the Excel to Resources tool for the first time and it did a pretty good job.

Thursday/Friday

Thursday I had to do some bookkeeping and other non-technical stuff. All the productivity tools I used the past week made me decide to create a buildserver for testing purposes (I was in automation mode :) ). So Thursday afternoon and most of the Friday I’ve configured a buildserver on a W2K3 virtual machine. I don’t think I’ll use it in my current project, but I guess it is pretty useful for future projects. I played around with it a bit.

Summary

The week after Øredev was a really productive week full of inspiration and it made me rethink a lot of things I was doing wrong before (and didn’t knew about).  I really hope this flow continues for a while, it’s a great feeling. At Øredev there were other sessions which were really great and made me think a lot, but those deserve their own post.

My first step(s) in the the blogosphere

General No Comments »

Don’t know whether my writings are interesting enough to read, but at least I’ll give it a chance to write some interesting stuff.

My name is Erwin Berends and for more information about me check out the About-page.

On this blog some articles will appear about software development (in general, especially .Net) and other technology-related stuff (like gadgets and tools).

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in