Rake-Task der Action eines Controllers aufruft und ActiveRecord-basierte Sessions

Juni 26, 2007

Heute hatte ich ein Problem als ich auf ActiveRecord-basierte Sessions umgestiegen bin. Danach funktionierten rake db:migrate und sämtliche anderen Rake-tasks nicht mehr, es kam immer die Fehlermeldung:

rake aborted
uninitialized constant CGI::Sessions::ActiveRecordStore … usw

Den Rake-Task mit dem Action aufruf habe ich von meinem Kollegen Mr. Matt ;-) http://matthall.wordpress.com/2006/12/06/how-to-execute-a-rails-controller-action-via-cron/

Um das Problem zu lösen müssen, die beiden Zeilen

require(’action_controller’) und
require(’action_controller/integration’)

in die environment.rb geschrieben werden. Danach lief alles wieder, puh, hat mich 2 Stunden gekostet dieses Problem.

Entry Filed under: RadRails, Rails, Ruby, Ruby/Rails. .

Leave a Comment

hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


RSS Der Gleisarbeiter Blog

 

Juni 2007
M D M D F S S
« Mai   Aug »
 123
45678910
11121314151617
18192021222324
252627282930  

Stichwortwolke

Cocoa Ferret Flash Flex Goldberg Java Mac Private RadRails Rails Ruby Ruby/Rails Spiele Sun Test Testing Uncategorized

Neueste Artikel

Neueste Kommentare

ffaerber zu can’t find header files …
sam zu Stemming mit ActsAsFerret
humpaaa zu Flex & RubyOnRails
gleisarbeiter zu Ruby & Cocoa auf Mac …
schroedi zu Ruby & Cocoa auf Mac …

Blog Stats

Links