Help error "undefined method `middleware' for #<Radiant::Configuration:0x6cc84c846cb0>"

Hi,

I’m installing Radiant on Dreamhost and I’m getting “undefined method
`middleware’ for #Radiant::Configuration:0x6cc84c846cb0” from the
following line “config.middleware.use ::Radiant::Cache”, 55, in config/
environment.rb.

Passenger is reporting a number of different possible causes, of which
I think “A required library may not installed. Please install all
libraries that this application requires.” is the problem

The real trick is how do I work out what library is missing?

Thanks in advance for any help!

here is the back trace:
0 /home/user/stage/config/environment.rb 55
1 /usr/lib/ruby/gems/1.8/gems/radiant-0.6.9/vendor/rails/railties/lib/
initializer.rb 47 in run' 2 /usr/lib/ruby/gems/1.8/gems/radiant-0.6.9/lib/radiant/initializer.rb 89 inrun’
3 /home/user/stage/config/environment.rb 12
4 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in
gem_original_require' 5 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 inrequire’
6 /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb 299
in preload_application' 7 /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb 248 ininitialize_server’
8 /dh/passenger/lib/phusion_passenger/utils.rb 255 in
report_app_init_status' 9 /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb 233 ininitialize_server’
10 /dh/passenger/lib/phusion_passenger/abstract_server.rb 194 in
start_synchronously' 11 /dh/passenger/lib/phusion_passenger/abstract_server.rb 163 instart’
12 /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb
209 in start' 13 /dh/passenger/lib/phusion_passenger/spawn_manager.rb 262 inspawn_rails_application’
14 /dh/passenger/lib/phusion_passenger/abstract_server_collection.rb
126 in lookup_or_add' 15 /dh/passenger/lib/phusion_passenger/spawn_manager.rb 256 inspawn_rails_application’
16 /dh/passenger/lib/phusion_passenger/abstract_server_collection.rb
80 in synchronize' 17 /dh/passenger/lib/phusion_passenger/abstract_server_collection.rb 79 insynchronize’
18 /dh/passenger/lib/phusion_passenger/spawn_manager.rb 255 in
spawn_rails_application' 19 /dh/passenger/lib/phusion_passenger/spawn_manager.rb 154 inspawn_application’
20 /dh/passenger/lib/phusion_passenger/spawn_manager.rb 287 in
handle_spawn_application' 21 /dh/passenger/lib/phusion_passenger/abstract_server.rb 352 insend
22 /dh/passenger/lib/phusion_passenger/abstract_server.rb 352 in
main_loop' 23 /dh/passenger/lib/phusion_passenger/abstract_server.rb 196 instart_synchronously’
24 /dh/passenger/bin/passenger-spawn-server 61

On Mon, Nov 29, 2010 at 6:54 PM, Marc [email protected] wrote:

The real trick is how do I work out what library is missing?

You’re running Radiant 0.6.9:

/usr/lib/ruby/gems/1.8/gems/radiant-0.6.9/vendor/rails/railties/lib/initializer.rb
47 in `run’

There is no middleware in 0.6.9

Ah, found an error in

  • should have been

    export GEM_PATH=“$GEM_HOME:/usr/lib/ruby/gems/1.8”

rather than

export GEM_PATH=“/usr/lib/ruby/gems/1.8:$GEM_HOME”

I updated the gems and I also added
ENV[‘GEM_PATH’] ||= ‘/home/user/.gems:/usr/lib/ruby/gems/1.8’

to the top of config/environment.rb

The site is up! Thanks heaps.