English 中文(简体)
NoMethodError(未界定的“连接——时间范围”用于<Typhoeus:Request:0x00000782ded8>):
原标题:NoMethodError (undefined method `connect_timeout= for #<Typhoeus::Request:0x000000000782ded8>):

我试图用Facebook执行Log-In。 一切在发展过程中都奏效,但对于生产而言,我不得不将 app升到https上,而当我推动生产时,任何东西都不奏效。

我不知道如何从生产中解脱这一点。 希望得到任何帮助。

Those are the server logs:

2018-09-17T19:07:21.708757+00:00 app[web.1]: I, [2018-09-17T19:07:21.708637 #4]  INFO -- : [c8077522-7674-46e5-97b8-c74456194630] Started GET "/users/auth/facebook" for 213.190.86.42 at 2018-09-17 19:07:21 +0000
2018-09-17T19:07:21.709189+00:00 app[web.1]: I, [2018-09-17T19:07:21.709128 #4]  INFO -- omniauth: (facebook) Request phase initiated.
2018-09-17T19:07:22.442651+00:00 app[web.1]: I, [2018-09-17T19:07:22.442540 #4]  INFO -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78] Started GET "/users/auth/facebook/callback?code=AQDCk0zcgI3_D0ZEuO5l6pWjAbhRgSelpfYcPB_f70hwffFdhs2MRp1rYd1fktORGUhqruLXbB40DXbbbx71zMHD2hH5UyndDQXbWpZ4gIoDuGVqO6IgFMwQuv0Jp_-PVQ2eokb_aW_ZfVY_LkIYPUWqy4fGihmWgd3S4cSlpo9zqV_0m9Ra4avOXQjw5a8VQEq2WNlIsun4J77x4EBzrOh_9xtVG582YV2pZy6tFE83QsvsmNkpBEzmWsV0bnGek94hbnbkpKRmImHfCLD5iyJ3HWZ3uQLG3FypdGZHjo8BtQ23Y2GeD5lnsyGlvqGRX4M&state=f58628a503514d6fd368e47a88f0f1c383e1dbe519b4ad09" for 213.190.86.42 at 2018-09-17 19:07:22 +0000
2018-09-17T19:07:22.443281+00:00 app[web.1]: I, [2018-09-17T19:07:22.443215 #4]  INFO -- omniauth: (facebook) Callback phase initiated.
2018-09-17T19:07:22.958420+00:00 app[web.1]: I, [2018-09-17T19:07:22.958291 #4]  INFO -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78] Processing by Users::OmniauthCallbacksController#facebook as HTML
2018-09-17T19:07:22.963677+00:00 app[web.1]: I, [2018-09-17T19:07:22.962975 #4]  INFO -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78]   Parameters: {"code"=>"AQDCk0zcgI3_D0ZEuO5l6pWjAbhRgSelpfYcPB_f70hwffFdhs2MRp1rYd1fktORGUhqruLXbB40DXbbbx71zMHD2hH5UyndDQXbWpZ4gIoDuGVqO6IgFMwQuv0Jp_-PVQ2eokb_aW_ZfVY_LkIYPUWqy4fGihmWgd3S4cSlpo9zqV_0m9Ra4avOXQjw5a8VQEq2WNlIsun4J77x4EBzrOh_9xtVG582YV2pZy6tFE83QsvsmNkpBEzmWsV0bnGek94hbnbkpKRmImHfCLD5iyJ3HWZ3uQLG3FypdGZHjo8BtQ23Y2GeD5lnsyGlvqGRX4M", "state"=>"f58628a503514d6fd368e47a88f0f1c383e1dbe519b4ad09"}
2018-09-17T19:07:22.987503+00:00 app[web.1]: D, [2018-09-17T19:07:22.987389 #4] DEBUG -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78]   User Load (3.9ms)  SELECT  "users".* FROM "users" WHERE "users"."provider" = $1 AND "users"."uid" = $2 LIMIT $3  [["provider", "facebook"], ["uid", "10156065770667984"], ["LIMIT", 1]]
2018-09-17T19:07:22.990121+00:00 app[web.1]: D, [2018-09-17T19:07:22.990015 #4] DEBUG -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78]    (1.6ms)  BEGIN
2018-09-17T19:07:22.997442+00:00 app[web.1]: D, [2018-09-17T19:07:22.997336 #4] DEBUG -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78]   User Exists (2.1ms)  SELECT  1 AS one FROM "users" WHERE "users"."username" = $1 AND "users"."id" != $2 LIMIT $3  [["username", "Listy"], ["id", 65], ["LIMIT", 1]]
2018-09-17T19:07:23.002441+00:00 app[web.1]: D, [2018-09-17T19:07:23.002365 #4] DEBUG -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78]   User Update (2.9ms)  UPDATE "users" SET "token" = $1, "token_expiry" = $2, "updated_at" = $3 WHERE "users"."id" = $4  [["token", "EAADxC9YDD2sBAKeTKx0Cgp86Dnm5l774a2vVsZBYwOTnl7TV9egMgBYjTtgY9lFHV6eW90V1KgRspbcHM3mKL92hKPO0fZAVbkNaWjdHzJ8TQiaRYJqZC3NnhNu6GOOr6eFtteA48XWhYXQslchLmFgUky1G50ZD"], ["token_expiry", "2018-11-16 19:07:22"], ["updated_at", "2018-09-17 19:07:22.997902"], ["id", 65]]
2018-09-17T19:07:23.055468+00:00 app[web.1]: D, [2018-09-17T19:07:23.055339 #4] DEBUG -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78]    (6.5ms)  COMMIT
2018-09-17T19:07:23.063263+00:00 app[web.1]: I, [2018-09-17T19:07:23.063174 #4]  INFO -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78] Completed 500 Internal Server Error in 99ms (Searchkick: 6.4ms | ActiveRecord: 19.1ms)
2018-09-17T19:07:23.064786+00:00 app[web.1]: F, [2018-09-17T19:07:23.064718 #4] FATAL -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78]
2018-09-17T19:07:23.062638+00:00 app[web.1]: D, [2018-09-17T19:07:23.062529 #4] DEBUG -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78]   User Store (6.4ms)  {"id":65,"exception":["NoMethodError","undefined method `connect_timeout=  for #u003cTyphoeus::Request:0x000000000782ded8u003e"],"exception_object":"undefined method `connect_timeout=  for #u003cTyphoeus::Request:0x000000000782ded8u003e"}
2018-09-17T19:07:23.065029+00:00 app[web.1]: F, [2018-09-17T19:07:23.064965 #4] FATAL -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78] NoMethodError (undefined method `connect_timeout=  for #<Typhoeus::Request:0x000000000782ded8>):
2018-09-17T19:07:23.065153+00:00 app[web.1]: F, [2018-09-17T19:07:23.065087 #4] FATAL -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78]
2018-09-17T19:07:23.065246+00:00 app[web.1]: [3d25cc49-e2ec-4593-bf2f-d06d5595cd78] app/controllers/users/omniauth_callbacks_controller.rb:3:in `facebook 
2018-09-17T19:07:23.065243+00:00 app[web.1]: F, [2018-09-17T19:07:23.065187 #4] FATAL -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78] app/models/user.rb:76:in `find_for_facebook_oauth 
2018-09-17T19:07:23.067245+00:00 heroku[router]: at=info method=GET path= "/users/auth/facebook/callback?code= AQDCk0zcgI3_D0ZEuO5l6pWjAbhRgSelpfYcPB_f70hwffFdhs2MRp1rYd1fktORGUhqruLXbB40DXbbbx71zMHD2hH5UyndDQXbWpZ4gIoDuGVqO6IgFMwQuv0Jp_-PVQ2eokb_aW_ZfVY_LkIYPUWqy4fGihmWgd3S4cSlpo9zqV_0m9Ra4avOXQjw5a8VQEq2WNlIsun4J77x4EBzrOh_9xtVG582YV2pZy6tFE83QsvsmNkpBEzmWsV0bnGek94hbnbkpKRmImHfCLD5iyJ3HWZ3uQLG3FypdGZHjo8BtQ23Y2GeD5lnsyGlvqGRX4M&state=f58628a503514d6fd368e47a88f0f1c383e1dbe519b4ad09" host=www.listy.club request_id=3d25cc49-e2ec-4593-bf2f-d06d5595cd78 fwd="213.190.86.42" dyno=web.1 connect=0ms service=630ms status=500 bytes=1891 protocol=https
2018-09-17T19:08:50.249219+00:00 heroku[run.8341]: Process exited with status 0
问题回答

从我的理解来看,有些人能够解决这个问题,把以下法典添加到一个初始者,尝试:

require  typhoeus 
require  typhoeus/adapters/faraday 

资料来源:





相关问题
rails collection_select vs. select

collection_select and select Rails helpers: Which one should I use? I can t see a difference in both ways. Both helpers take a collection and generates options tags inside a select tag. Is there a ...

SSL slowness in EC2

We ve deployed our rails app to EC2. In our setup, we have two proxies on small instances behind round-robin DNS. These run nginx load balancers for a dynamically growing and shrinking farm of web ...

Auth-code with A-Za-z0-9 to use in an URL parameter

As part of a web application I need an auth-code to pass as a URL parameter. I am currently using (in Rails) : Digest::SHA1.hexdigest((object_id + rand(255)).to_s) Which provides long strings like : ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

activerecord has_many :through find with one sql call

I have a these 3 models: class User < ActiveRecord::Base has_many :permissions, :dependent => :destroy has_many :roles, :through => :permissions end class Permission < ActiveRecord::...

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

Text Editor for Ruby-on-Rails

guys which text editor is good for Rubyonrails? i m using Windows and i was using E-Texteditor but its not free n its expired now can anyone plese tell me any free texteditor? n which one is best an ...

How to get SQL queries for each user where env is production

I’m developing an application dedicated to generate statistical reports, I would like that user after saving their stat report they save sql queries too. To do that I wrote the following module: ...

热门标签