Yelotofu

Yelotofu ~ “In building standards compliant sites we are creating a better Web for the future.”

Archive for April, 2006

RoR & SVN cross-platform development

In a normal development environment you're likely to have developers working on different OS platforms to your server or in some cases, especially with remote working, you'd have developers working on different OS platforms to each other. With RoR this is probably more so as most developers I know use WindowsXP as their preferred development environment whereas Rails is normally served off a *nix box. Due to these setups cross-platform compatibility issues are inevitable. Take my current project as an example. I am running WindowsXP whereas another developer in my team is using MacOSX, which is a Unix-like operating system. Whenever we share files over SVN rails starts to complain about EOL (End Of Line) problems or not being able to detect the EOL. This is due to the fact that Windows and Unix-like OS use different EOL styles and do not share common file attributes.

The resolution is simple and it's on the SVN side. Set svn:executable and svn:eol-style properties of /public/dispatch.fcgi and all files within the /scripts/ folder to:

svn:executable = *
svn:eol-style = native

Now, Commit changes and Update local SVN files.

If errors persist and is along the lines of, "rake, rakefile cannot be found" when running rake or, "Ruby bin folder cannot be found" when running the project then try the following:

  1. Open up dispatch.fcgi
  2. Insert a blank line at the end of the file, re-save and Commit the file.

The above ensures that the repository is correctly updated with the latest file when you Commit.

Learning Ruby

For a recent project I had to learn RoR (Ruby on Rails). After looking into this whole new arena to web development I am very impressed by its rapid web development framework. Honestly, you can quickly create a prototype application in just a few lines of code!

Here are a few resources I found useful whilst learning Ruby:

  • Check out radrails. A cross-platform IDE for developing Rails projects
  • Tortoise SVN. A Subversion for Windows. Radrails integrates very well with this.
  • Ruby on Rails HowTos. Quick and dirty guides on common problems/tasks.
  • Ruby-Docs. For those who want to know everything about Ruby!

To get on the band wagon decided to get a book to kick start the learning. A quick search on Amazon landed me on "Pragmatic Programmers - Programming Ruby, 2nd Ed". Apparently this is THE definitive book! A must have! I only recently moved to Hong Kong. It's a great city. It has everything a modern citizen would need from good food to endless entertainment... BUT... I could not seem to find a single good English bookstore!!! I'd admit, I haven't been here long enough to assert the above statement as true. Though I'm going to the Page One store in Festival Walk tomorrow to find out.

In the UK there is no shortage of good bookstores. We even take them for granted, sometimes, turning them into cafés and tourist attractions.