Error when calling redirect_to (NoMethodError (undefined method `uri_https_url' for #<InvitesContro

Here’s the full stack trace of the problem, I’m assuming uri_https_url
is constructed somehow? I’m stumped.

NoMethodError (undefined method uri_https_url' for #<InvitesController:0x356a9d4>): /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/polymorphic_routes.rb:27:insend!’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/polymorphic_routes.rb:27:in polymorphic_url' /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/base.rb:618:inurl_for’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:1060:in redirect_to' /app/controllers/invites_controller.rb:40:ingoogle_auth’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:1158:in send' /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/base.rb:1158:inperform_action_without_filters’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/filters.rb:697:in call_filters' /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/filters.rb:689:inperform_action_without_benchmark’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/benchmarking.rb:68:in
perform_action_without_rescue' /opt/local/lib/ruby/1.8/benchmark.rb:293:inmeasure’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/benchmarking.rb:68:in
perform_action_without_rescue' /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/rescue.rb:199:inperform_action_without_caching’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/caching.rb:678:in perform_action' /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/ active_record/connection_adapters/abstract/query_cache.rb:33:incache’
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
active_record/query_cache.rb:8:in cache' /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/caching.rb:677:inperform_action’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:524:in send' /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/base.rb:524:inprocess_without_filters’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/filters.rb:685:in
process_without_session_management_support' /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/session_management.rb:123:inprocess’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:388:in process' /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/dispatcher.rb:171:inhandle_request’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:115:in dispatch' /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/dispatcher.rb:126:indispatch_cgi’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:9:in dispatch' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/ rails.rb:76:inprocess’
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/…/lib/mongrel/
rails.rb:74:in synchronize' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/ rails.rb:74:inprocess’
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:
159:in process_client' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb: 158:ineach’
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:
158:in process_client' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb: 285:inrun’
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:
285:in initialize' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb: 285:innew’
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:
285:in run' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb: 268:ininitialize’
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:
268:in new' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb: 268:inrun’
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/
configurator.rb:282:in run' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/ configurator.rb:281:ineach’
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/
configurator.rb:281:in run' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails: 128:inrun’
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/
command.rb:212:in run' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails: 281 /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:489:inload’
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:489:in load' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:342:innew_constants_in’
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:489:in load' /opt/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/ mongrel.rb:64 /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb: 27:ingem_original_require’
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:
27:in require' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:496:inrequire’
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:342:in new_constants_in' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:496:inrequire’
/opt/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/
server.rb:39
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:
27:in gem_original_require' /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb: 27:inrequire’
script/server:3

Could you post the code that is generating the stack?

On Apr 15, 2:08 pm, Stuart Grimshaw [email protected]

On 15 Apr, 23:48, “[email protected]” <ESPN3.DL-
[email protected]> wrote:

Could you post the code that is generating the stack?

I’m using the Ruby Google Authsub plugin[1] from Stuart C., it’s a
very early beta, and I’m just trying to follow the README file.

def google_auth
auth = GoogleAuthSub.new(:next_url => ‘http://
ft.stuartgrimshaw.co.uk’,
:scope_url => ‘http://www.google.com/m8/feeds/’,
:secure => false )

redirect_to auth.request_url

end

[1] http://www.cybertherial.com/weblog/?p=16

Hi I just came across this bug too with authsub. I went up the stack and
traced it to the polymorphic url generated by the url_for function. The
URI::HTTPS class, (which is only about 2 lines of code in my edition of
rails) may have been enhanced in a version later than rails 2.1.0 to
include a uri_https_url function. (URI:HTTP contains what looks to be an
analog of this - request_uri)

In any case, I’m not sure whether the HTTPS class in rails 2.1.0 is out
of sync with the one that the authsub plugin was built with, or if there
is an extra parameter that needs to be passed, etc… However, there is a
simple fix. Just put this in your controller:

def uri_https_url (request_path)
request_path.to_s
end

Best,
Ismail Degani

Stuart G. wrote:

On 15 Apr, 23:48, “[email protected]” <ESPN3.DL-
[email protected]> wrote:

Could you post the code that is generating the stack?

I’m using the Ruby Google Authsub plugin[1] from Stuart C., it’s a
very early beta, and I’m just trying to follow the README file.

def google_auth
auth = GoogleAuthSub.new(:next_url => ‘http://
ft.stuartgrimshaw.co.uk’,
:scope_url => ‘http://www.google.com/m8/feeds/’,
:secure => false )

redirect_to auth.request_url

end

[1] http://www.cybertherial.com/weblog/?p=16