undefined method `new' for "Rack::Lock":String (NoMethodError)

55 views
Skip to first unread message

jlecour

unread,
Apr 25, 2009, 11:33:48 AM4/25/09
to Rack Development
Hello,

I've just upgraded my Rack gem, restarted my app and I get a big
error :

undefined method `new' for "Rack::Lock":String (NoMethodError)

If I go back to 0.9.1 it's working perfectly again.

I'm on Mac OS X 10.5.6, with Passenger 2.2.1 and Ruby Enterprise
Edition 1.8.6-20090201

I hope you could find a fix.

A big "THANK YOU" to everybody in the team for your efforts with Rack
and else.

Cheers
-- Jérémy Lecour

Christian Neukirchen

unread,
Apr 25, 2009, 11:47:21 AM4/25/09
to rack-...@googlegroups.com
jlecour <jeremy...@gmail.com> writes:

> undefined method `new' for "Rack::Lock":String (NoMethodError)

Backtrace please.

--
Christian Neukirchen <chneuk...@gmail.com> http://chneukirchen.org

jlecour

unread,
Apr 25, 2009, 12:25:48 PM4/25/09
to Rack Development
> undefined method `new' for "Rack::Lock":String (NoMethodError)

0 /Users/jimmy/Boulot/Ubik-Lab/UbikEvent/ubikevent/vendor/rails/
actionpack/lib/action_controller/middleware_stack.rb 72 in `build'
1 /Users/jimmy/Boulot/Ubik-Lab/UbikEvent/ubikevent/vendor/rails/
actionpack/lib/action_controller/middleware_stack.rb 116 in `build'
2 /Users/jimmy/Boulot/Ubik-Lab/UbikEvent/ubikevent/vendor/rails/
activesupport/lib/active_support/dependencies.rb 440 in `inject'
3 /Users/jimmy/Boulot/Ubik-Lab/UbikEvent/ubikevent/vendor/rails/
actionpack/lib/action_controller/middleware_stack.rb 116 in `each'
4 /Users/jimmy/Boulot/Ubik-Lab/UbikEvent/ubikevent/vendor/rails/
actionpack/lib/action_controller/middleware_stack.rb 116 in `inject'
5 /Users/jimmy/Boulot/Ubik-Lab/UbikEvent/ubikevent/vendor/rails/
actionpack/lib/action_controller/middleware_stack.rb 116 in `build'
6 /Users/jimmy/Boulot/Ubik-Lab/UbikEvent/ubikevent/vendor/rails/
actionpack/lib/action_controller/dispatcher.rb 82 in `initialize'
7 /Users/jimmy/Boulot/Ubik-Lab/UbikEvent/ubikevent/vendor/rails/
actionpack/lib/action_controller/dispatcher.rb 52 in `new'
8 /Users/jimmy/Boulot/Ubik-Lab/UbikEvent/ubikevent/vendor/rails/
actionpack/lib/action_controller/dispatcher.rb 52 in
`run_prepare_callbacks'
9 /Users/jimmy/Boulot/Ubik-Lab/UbikEvent/ubikevent/vendor/rails/
railties/lib/initializer.rb 609 in `prepare_dispatcher'
10 /Users/jimmy/Boulot/Ubik-Lab/UbikEvent/ubikevent/vendor/rails/
railties/lib/initializer.rb 183 in `process'
11 /Users/jimmy/Boulot/Ubik-Lab/UbikEvent/ubikevent/vendor/rails/
railties/lib/initializer.rb 113 in `send'
12 /Users/jimmy/Boulot/Ubik-Lab/UbikEvent/ubikevent/vendor/rails/
railties/lib/initializer.rb 113 in `run'
13 ./config/environment.rb 11
14 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb 31 in `gem_original_require'
15 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb 31 in `require'
16 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.1/lib/phusion_passenger/railz/application_spawner.rb 267
in `preload_application'
17 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.1/lib/phusion_passenger/railz/application_spawner.rb 227
in `initialize_server'
18 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.1/lib/phusion_passenger/utils.rb 216 in
`report_app_init_status'
19 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.1/lib/phusion_passenger/railz/application_spawner.rb 216
in `initialize_server'
20 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.1/lib/phusion_passenger/abstract_server.rb 185 in
`start_synchronously'
21 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.1/lib/phusion_passenger/abstract_server.rb 154 in
`start'
22 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.1/lib/phusion_passenger/railz/application_spawner.rb 192
in `start'
23 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.1/lib/phusion_passenger/spawn_manager.rb 257 in
`spawn_rails_application'
24 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.1/lib/phusion_passenger/abstract_server_collection.rb
126 in `lookup_or_add'
25 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.1/lib/phusion_passenger/spawn_manager.rb 251 in
`spawn_rails_application'
26 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.1/lib/phusion_passenger/abstract_server_collection.rb 80
in `synchronize'
27 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.1/lib/phusion_passenger/abstract_server_collection.rb 79
in `synchronize'
28 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.1/lib/phusion_passenger/spawn_manager.rb 250 in
`spawn_rails_application'
29 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.1/lib/phusion_passenger/spawn_manager.rb 153 in
`spawn_application'
30 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.1/lib/phusion_passenger/spawn_manager.rb 282 in
`handle_spawn_application'
31 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.1/lib/phusion_passenger/abstract_server.rb 337 in
`__send__'
32 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.1/lib/phusion_passenger/abstract_server.rb 337 in
`main_loop'
33 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.1/lib/phusion_passenger/abstract_server.rb 187 in
`start_synchronously'
34 /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.1/bin/passenger-spawn-server 55

Hongli Lai

unread,
Apr 25, 2009, 2:27:13 PM4/25/09
to Rack Development
Phusion Passenger vendors an older version of Rack (< 1.0 but > 0.4)
in order work around broken applications that have a hard dependency
on 0.4.

It seems like the 1.0 release broke this?

Christian Neukirchen

unread,
Apr 25, 2009, 2:56:29 PM4/25/09
to rack-...@googlegroups.com
Hongli Lai <hon...@phusion.nl> writes:

Upgrading to 1.0 is a good way to fix old broken apps. :-)
(Note that you don't need to implement content-length counting with 1.0,
if that was the reason they are broken.)

Hongli Lai

unread,
Apr 26, 2009, 5:18:39 AM4/26/09
to Rack Development
On Apr 25, 8:56 pm, Christian Neukirchen <chneukirc...@gmail.com>
wrote:
> Upgrading to 1.0 is a good way to fix old broken apps. :-)
> (Note that you don't need to implement content-length counting with 1.0,
> if that was the reason they are broken.)

Actually the problem is that there are broken applications have a hard
dependency on the 0.4.0 Rack gem, while Phusion Passenger just had a
dependency on the Rack gem with no version constraint. If a newer
version of the Rack gem was installed then Phusion Passenger would
load that, which breaks the app which in turn tries to load 0.4.0.

Anyway, as for the problem of the original poster: this turns out to
be a combination of problems in Rails and Phusion Passenger. Please
direct all further discussions to http://code.google.com/p/phusion-passenger/issues/detail?id=279

jlecour

unread,
Apr 26, 2009, 12:06:45 PM4/26/09
to Rack Development
Rack 1.0.0 is working with Passenger 2.2.2
Reply all
Reply to author
Forward
0 new messages