Hi all, Can somebody please help me with this? I''ve been trying to put up my rails app (works perfectly on webrick) on apache2 with fcgi. I''m subjected to non-stop errors, it worked once, I made a change to app and moved it again to the server, and kaboom, it doesn''t work now. production.log shows this: Processing LoginController#login (for at Tue Sep 27 08:23:19 BST 2005) Parameters: {"action"=>"login", "controller"=>"login"} NoMethodError (undefined method `downcase'' for nil:NilClass): /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/request.rb:13:in `method'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/request.rb:18:in `get?'' /app/controllers/login_controller.rb:36:in `login'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `perform_action_without_filters'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/filters.rb:295:in `perform_action_without_benchmark'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `measure'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue'' Thanks, Vamsee.
what happens on line 36 in your login_controller? Am Dienstag, den 27.09.2005, 12:41 +0530 schrieb Vamsee Kanakala:> Hi all, > > Can somebody please help me with this? I''ve been trying to put up > my rails app (works perfectly on webrick) on apache2 with fcgi. I''m > subjected to non-stop errors, it worked once, I made a change to app and > moved it again to the server, and kaboom, it doesn''t work now. > production.log shows this: > > Processing LoginController#login (for at Tue Sep 27 08:23:19 BST 2005) > Parameters: {"action"=>"login", "controller"=>"login"} > > > NoMethodError (undefined method `downcase'' for nil:NilClass): > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/request.rb:13:in > `method'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/request.rb:18:in > `get?'' > /app/controllers/login_controller.rb:36:in `login'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in > `perform_action_without_filters'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/filters.rb:295:in > `perform_action_without_benchmark'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in > `perform_action_without_rescue'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in > `measure'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in > `perform_action_without_rescue'' > > Thanks, > Vamsee. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Norman Timmler wrote:>what happens on line 36 in your login_controller? > > >Line 36 is actually pretty straightforward: 35 def login 36 if request.get? 37 session[:user_id] =nil 38 @user = User.new 39 else ... Does that mean the request object is nil? How can that be? Thanks, Vamsee.
Am Dienstag, den 27.09.2005, 15:25 +0530 schrieb Vamsee Kanakala:> Does that mean the request object is nil? How can that be?It seems that the environment variable ''REQUEST_METHOD'' does not get set. But i don''t know where the failure happen. Sorry.>From request.rb:# Returns the HTTP request method as a lowercase symbol (:get, for example) def method env[''REQUEST_METHOD''].downcase.to_sym end # Is this a GET request? Equivalent to request.method == :get def get? method == :get end