草庐IT

credential-providers

全部标签

ruby - Net::HTTP SocketError: getaddrinfo: nodename 或 servname provided, or not known

我用谷歌搜索了这个问题并浏览了关于这个问题的相关帖子。我认为这不是Rails/Ruby问题,但不确定下一步该怎么做。irb(main):007:0>Net::HTTP.get_response("http://www.apple.com","")SocketError:getaddrinfo:nodenamenorservnameprovided,ornotknownfrom/Users/dan/.rbenv/versions/2.2.3/lib/ruby/2.2.0/net/http.rb:879:in`initialize'否则没有网络问题。apple.com在浏览器中加载正常。这

ruby-on-rails - Aws::S3::Presigner undefined method credentials for nil:NilClass in Ruby

我使用了aws-sdk-coregem我在从aws获取url时遇到错误以下是我的代码definitialize(bucket:,region:)@bucket=bucketclient=Aws::S3::Client.new(region:region)@signer=Aws::S3::Presigner.new(client:client)enddefsign(key,expires_in:3600)@signer.presigned_url(:get_object,bucket:@bucket,key:key,expires_in:expires_in)end我遇到了错误NoMet

ruby-on-rails - 为自定义 omniauth 策略获取 "Authentication failure! invalid_credentials: OAuth2::Error"

目前我正在处理Rails4项目,现在我必须链接/连接另一个应用程序(不是sso,而是用于访问API),比如example.com。(注意example.com使用三足式oauth安全架构)搜索后发现必须要实现omniouth策略。为此我引用了this关联。根据Strategy-Contribution-Guide我能够完成设置和请求阶段,您可以在此处找到我的示例代码。require'multi_json'require'omniauth/strategies/oauth2'require'uri'moduleOmniAuthmoduleStrategiesclassMyAppStrat

ruby-on-rails - 处理身份登录的 OmniAuth::Error (invalid_credentials)

我使用OmniAuthIdentity进行正常登录。Rails3.2.3和Ruby1.9.3p194。目前,当现有用户尝试使用无效凭据登录时,我会收到以下错误:StartedPOST"/auth/identity/callback"for127.0.0.1at2012-07-1217:00:03-0400(identity)Callbackphaseinitiated.IdentityLoad(0.1ms)SELECT"identities".*FROM"identities"WHERE"identities"."email"='test'LIMIT1(identity)Authent

ruby-on-rails - 我如何解决 "Missing host to link to! Please provide the :host parameter"? (返回率)

我正在关注RoRTutorial我被困在Listing9.15运行'bundleexecrspecspec/'后出现以下错误:1)AuthenticationauthorizationaswrongusersubmittingaPATCHrequesttotheUsers#updateactionFailure/Error:specify{expect(response).toredirect_to(root_url)}ArgumentError:Missinghosttolinkto!Pleaseprovidethe:hostparameter,setdefault_url_opti

ruby-on-rails - ruby rails : provide vs content_for

我今天遇到了View辅助函数“provide”。通过查看它的手册,我仍然对它与“content_for”的不同之处感到困惑。provide(name,content=nil,&block)Thesameascontent_forbutwhenusedwithstreamingflushesstraightbacktothelayout.Inotherwords,ifyouwanttoconcatenateseveraltimestothesamebufferwhenrenderingagiventemplate,youshouldusecontent_for,ifnot,useprov

ruby-on-rails - getaddrinfo : nodename nor servname provided, 或未知

我在运行MacOSX10.6的计算机上部署了一个RubyonRails应用程序。出现问题的代码是由delayed_job运行的。只有在通过delayed_job运行时才会出现此问题。如果我在控制台中运行它(railsconsoleproduction)或直接通过cURL调用API,它可以毫无问题地运行。此外,整个过程在我的开发环境中正常运行。基本上,代码可以在一个地方工作,但由于某种原因,在必须工作的地方会失败。我搜索并找到了一些资源,但这些建议都不适用或没有任何区别。当我登录到服务器并运行命令时,一切正常。但由于某些原因,当它们由Capistrano运行/启动时,它不起作用。非常感谢

javascript - 添加提供程序@NgModule 时出现 Angular2 "No provider for Service!"错误

我有一个应用程序模块和单组件应用程序(用于演示我的问题),并出现以下错误:Errorin./AppComponentclassAppComponent_Host-inlinetemplate:0:0causedby:NoproviderforUserService!;Zone:;Task:Promise.then;Value:AppModule代码:import{NgModule}from'@angular/core';import{BrowserModule}from'@angular/platform-browser';import{UserService}from'./compo

javascript - Angular : Mixing provider and custom service in module's config/run

我想做这样的事情:angular.module('app',[]).config(['$httpProvider','customAuthService',($httpProvider,customAuthService)->$httpProvider.defaults.transformRequest.push(data)->ifcustomAuthService.isLoggedIndata['api_key']={token:@token}])根据Angularjsdoc,我不能在我的module的configblock中执行此操作,因为那里不允许自定义服务,我也不能在run中执

javascript - 简单的 Angular Testing 失败($injector :unpr Unknown Provider) when I have no dependencies

我得到thiserror。这与我的注入(inject)器无法解决所需的依赖关系有关,但即使我对Angular了解有限,我也很确定这段代码不应该依赖于任何模块。此代码在浏览器中运行良好,但它似乎不想在我的测试中运行。我一直在关注文档中的examples我的Angular版本是1.2.13(编辑:现在使用1.12.15)。这是我的代码:varapp=angular.module('app',[]).controller('GreetingCtrl',function($scope){$scope.title="HelloWorld!";$scope.message="Test,test.O