Permissions problem with Rake on XP

by George on January 5, 2009

When starting out a new rails project on Windows XP, I ran into a strange problem. I usually do all my development on Mac OSX, but this week I had a need to set up a new project on a XP box. After creating my rails project and a few models. I ran rake db:migrate to set up my development database. All seemed to be going well until I tried to run autotest. Prior to running my test suite, I ran the rake task to set up my test data base with the following result.

> rake db:test:prepare

rake aborted!

 

Permission denied - db/test.sqlite3

(See full trace by running task with –trace)

The full trace was not much help either. I’m using SQLite in this case, so I thought there may be a problem with the db/test.sqlite3 file in my project. I checked the permissions and everything looked fine. I was even able to connect to the test.sqlite3 data base using the sqlite3 command line and add tables, insert records, etc. Finally I tried to delete the test.sqlite3 file thinking I would just re-create it. Then I get the message from XP telling me that the file can not be deleted because it is being used by another process. Ah ha! Apparently, Aptana Studio had a lock on the file which was causing rake to puke. I closed Aptana Studio and the rake task ran as expected. I did look to make sure that the file was not open in studio first and it was not. Looks like Aptana Studio gets another demerit on the chalkboard today.

{ 3 comments }

How to get Ruby working with SQLite on Windows

by George on December 21, 2008

I know, I know – it’s Windows. Step 1, buy a Mac. I do much of my development on a Mac, and it truly is much easier to set things up. Unfortunately, I don’t always have a choice where my code is developed or deployed. I recently needed to get SQLite working with my Ruby development environment on Windows XP. It was a huge pain that involved tracking down a few different errors, so I thought I’d list out what I came across to help out anyone else out there that is in the unfortunate situation of having to work with XP. [click to continue…]

{ 5 comments }

Aptana Studio crashing

December 18, 2008

Well, I’m a little bit dissappointed. I’ve been using the new Aptana Studio 1.2.1 for a couple of days now, and there are apparently still some kinks to be worked out. I just had the studio crash on me again. That’s the second time today, and it happened once yesterday as well. There are no [...]

Read the full article →

Aptana 1.2.1 release

December 17, 2008

The good folks over at Aptana recently released their latest Aptana Studio. I’m checking it out tonight. Looks to be pretty promising so far. However, I did have a few issues with the install process. I tried to run the auto-updater and just update to the latest version, and it looked as if all were [...]

Read the full article →

WordPress 2.7 is greatness

December 12, 2008

I just want to officially go on record as saying that the latest WordPress is sweet. A great big huge thank you to all the developers and testers that put this latest release together.

Read the full article →

Back to the grind

November 24, 2008

After a bit of a break from the blog and a trip out of the country, we’re back at work and trying to get everything revved up again. It’s always hard for me to break away from my work world and unplug for a while. Working with the computer and writing code has been such [...]

Read the full article →

MAMP for PHP development on the Mac

October 14, 2008

I’m a Mac guy. I haven’t always been a Mac guy but I was forced to make the change just over 2 years ago when I went to work for a local company that was exclusively Mac. After about a 2 to 3 month adjustment period, I began to see the light. Now I love [...]

Read the full article →

PHP to Ruby Rewrite :: Week Two

September 20, 2008

Sadly, I was not able to spend nearly as much time on the rewrite project this week as I wanted to. I have a code release early next week for another project, and I still had a number of things to wrap up there. So, the rewrite project had to be put on hold for [...]

Read the full article →

ActiveRecord does not like attributes called type

September 15, 2008

Here’s an interesting issue that I ran into while setting up a bunch of new models for a new application. Ultimately I discovered that “type” is a reserved field name for classes that inherit from ActiveRecord. When I tried to create a new object, one of the fields would not accept a value and remained [...]

Read the full article →

PHP to Ruby Rewrite :: Week One

September 13, 2008

Well, we’re at the end of week one and I feel like we’ve made some decent progress on the big rewrite project. We spent some time going through the data design of the old application in order to get a lot of that back in our heads and sketched out on paper. We also spent [...]

Read the full article →