Error while initializng temporary session directories in edge

I'm encountering an odd error when starting up apps running Edge on my production server (or in the console). The same app works fine in deployment mode on a different machine. Note, this seems to be only a problem with edge, as i run several apps under 1.2.1 on the same server and do not have any problems. Here is the full stack-trace:

./script/../config/../vendor/rails/activesupport/lib/active_support/ dependencies.rb:263:in `load_missing_constant': uninitialized constant ActionController::CgiRequest (NameError) from ./script/../config/../vendor/rails/activesupport/lib/ active_support/dependencies.rb:452:in `const_missing' from /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/ action_controller/session_management.rb:34:in `session_options' from ./script/../config/../vendor/rails/railties/lib/initializer.rb: 311:in `initialize_temporary_directories' from ./script/../config/../vendor/rails/railties/lib/initializer.rb: 100:in `process' from ./script/../config/../vendor/rails/railties/lib/initializer.rb: 46:in `run' from /home/railsapps/fivechimes/releases/20070307070003/config/ environment.rb:13 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from ./script/../config/../vendor/rails/activesupport/lib/ active_support/dependencies.rb:495:in `require' ... 16 levels... from ./script/../config/../vendor/rails/activesupport/lib/ active_support/dependencies.rb:342:in `new_constants_in' from ./script/../config/../vendor/rails/activesupport/lib/ active_support/dependencies.rb:495:in `require' from ./script/../config/../vendor/rails/railties/lib/commands/ server.rb:39 from script/server:3

What i find strange is that at one point it seems to look for session_management.rb in the gem (?), while the vendor directory is clearly present and is otherwise used. It also seems to be related to Session management, which was recently changed (i use ActiveRecordStore and not the new default). FYI, line 13 in environment.rb is where the Rails::Initializer block starts. Does anybody have any ideas?

oops, i didn't mean to post this in the core list. sorry.

(not that i would complain if anybody here could help out with this error)

I’m encountering an odd error when starting up apps running Edge on my production server (or in the console). The same app works fine in deployment mode on a different machine.

Same here. It’s very strange.

Pay attention to this line in the stack trace:

from /usr/lib/ruby/gems/1.8/gems/actionpack- 1.13.1/lib/ action_controller/session_management.rb:34:in `session_options’

We both have Rails in “vendor/rails”, right? So why is it then using gem ActionPack?

I’ve figured it out. It broke my edge apps on some machines after cookie store was added, but until now I didn’t know why.

The reason ActionController is read from the gem ActionPack instead of vendor/rails/actionpack is because require ‘action_controller’ (in require_frameworks) fails to load it from the latter. It fails because it wants to load ‘cookie_store’, too, but cookie_store requires ‘openssl’, which is in Ruby standard library, but for some reason it isn’t installed with the ruby1.8 package for Ubuntu (probably Debian, too).

The solution is to install “libopenssl-ruby1.8” package on your machine.

Debian/Ubuntu strikes again!

- Jamis