Wednesday, April 13, 2011

Javascript and Rails

I have learned two things in the last 24 hours:

Javascript in partials

You can't place <% javascript_tag do %> in partials if you expect your javascript to be seen.

Multiple Requests as a Result of Form Submit

Multiple inclusions of js files, e.g. rails.js can cause multiple events/requests to be posted as a result of form submit. This is very hard to debug, but rails server shows, e.g. multiple GET requests being performed.

Monday, April 4, 2011

Cucumber on Windows

You must augment instructions from RSpec book for installing Cucumber on Windows. Specifically, you need to download MinGW for gcc (c compiler) and make. MinGW is
available from http://www.mingw.org/

When installing MinGW, make sure you select MSYS Developer Kit when stepping through installer.

To access gcc, you need to augment PATH environment variable to include C:\MinGW\bin.
To access make, you need to include C:\MinGW\msys\1.0\bin on your PATH environment variable. See Control Panel->System->Advanced->Environment Variables to edit PATH environment variable.