Poking in ActionController

October 30th, 2007

I have an ‘accept’ action in one of the controllers and when I was trying to run a functional test against it I got:

ActionController::UnknownAction in 'ContributorRequestsController for moderator allow to accept a request' No action responded to accept

And of course it worked fine when I’ve actually started the server and invoked it from browser.

Read the rest of this entry

NetBeans + BEA JRockit

October 1st, 2007

NetBeans Ryby IDE was cool. On my PC at work. But when I’ve got a new laptop and switched to working on it, it appeared to be dead slow when editing RHTML files. I’ve tried to figure out the reason (tried different builds, settings, etc…) and finally realized that I’ve had BEA JRockit JVM on my PC and SUN JVM on the laptop. So I’ve installed JRockit and now it seems to work great again.

So the moral is that NetBeans appears to work faster on AMD64×2/Ubuntu laptop with BEA JRockit. Perhaps not just for me…

Когда я искал инфу о REST, то нашел на мой взгляд хороший туториал (101) из 5-ти частей, автором которого является Jeff Cohen. Сам автор предложил опубликовать ссылки на переводы туториала на другие языки и я решил попробовать перевести его на русский. Я далеко не переводчик, и не филолог/лингвист, поэтому перевод наверняка изобилует разнообразными ошибками. Если есть желание принять участие в редактировании – пишите. И конечно, всегда лучше читать подобные вещи в оригинале (там с картинками и прибаутками), но тем не менее вот:

P.S. Большое спасибо Антону (aka Tonic) за помощь с переводом.

We do lot’s of things from console when using Rails and it can be a little painful on Windows. However, we can try to make our lives better.

Read the rest of this entry

Overriding Rake Tasks

July 30th, 2007

It seems that I’m lucky cause the project I’m currently working on forces me to deal with non-typical problems again and again. This time I need to override one of the default Rails Rake tasks behaviour. For some reason I thought that I’ll simply be able to do it somehow, but it appeared that Rake doesn’t allow that and I’ve ended up with another plugin :)

Read the rest of this entry

At my current job I’m being asked to send a list of trac tickets I’ve been working on in the previous 2 weeks. After reading this post I figured out that it can be easily done with Rake (well, as everything else you can dream about).

Read the rest of this entry

Perhaps some guys who came to Rails from PHP expected session expiry to be handled automatically. But in Rails we have to deal with it ourselves. There’s an awesome article on the topic. The main idea is that we need to clear expired sessions which were not accessed for some time and the ones which were created a long time ago. I’ve tried to find a ready-made script for this purpose, but found the ones that deal with database based sessions only, so decided to write it myself.

Read the rest of this entry

I think most applications deal with some kind of configuration parameters like admin emails, directory paths or whatever. Sometimes having a bunch of constants in environment.rb is fine, but when you have several developers working on a project and each of them may have their own values and can add new parameters you need a clean solution to handle that.

Read the rest of this entry