mandag 16. november 2009

Devise authentication

A great solution for authentication I used in a project today. Very simple to set up, and totally unobtrusive because of its middleware nature. Devise uses Warden.

A good blogpost explains.

Devise worked great with my rails 2.3 project, restful nested resources and all. Now just need to get that actionmailer setup working...


Finally a pdf solution that works great and is fairly easy to set up. It uses simple html as a template for the pdf rendering.

First download and install wkhtmltopdf program. I used this osx version:

Then I had to change the name of the binary to just wkhtmltopdf and put it in the search path. In my case /bin

The wicked_pdf plugin uses the which command to locate it.

Then follow the simple instructions at wicked_pdf github page.

søndag 27. september 2009

Linkparser and linkgrammar on Mac OS X Leopard

After some hours struggling with installationproblems I finally figured this out today. Installing Ruby Linkparser on Snow Leo was a breeze, but since my server workds on OSX Leopard I had to work out a way to make the installation work on that version as well. Somehow linkparser did not find the link grammar library. Following the instructions on the linkparser page, the solution was to do the following line instead of the bottom one in the instructions:

ARCHFLAGS="-arch i386" sudo gem install linkparser-1.0.5.gem -- --with-link-grammar-dir=/usr/local/lib

adding the option of "with-link-grammar-dir" to the gem install instead of the rake. . .

This works with version 1.0.5, and grammar version 4.6.2