我正在尝试从DocuSign文档设置并启动Ruby Quickstart项目:https://developers.docusign.com/docs/esign-rest-api/how-to/code-launchers/
我填写了表格,下载了包含代码的zip,并遵循了整个设置,没有任何困难。
但是当我启动服务器并尝试访问http://localhost:3000/时,显示错误:
NoMethodError in DsCommonController#index
undefined method `sub' for nil:NilClass
Extracted source (around line #40):
def worker
39 configuration = DocuSign_eSign::Configuration.new
40 configuration.host = args[:base_path] <<<< error on this line
41
42 @api_client = DocuSign_eSign::ApiClient.new(configuration)
43 @api_client.set_base_path(args[:base_path])
Rails.root: /Users/*******/Quickstart App-1-ruby
字符串
在终端:
NoMethodError (undefined method `sub' for nil:NilClass
@host = host.sub(/https?:\/\//, '').split('/').first
^^^^):
app/services/e_sign/get_data_service.rb:40:in `worker'
app/services/e_sign/get_data_service.rb:30:in `cfr?'
app/controllers/ds_common_controller.rb:21:in `handle_redirects'
app/controllers/ds_common_controller.rb:9:in `index'
型
我遵循了每一步,我不知道我做错了什么。有人有提示吗?
Thanks in advance
1条答案
按热度按时间nwo49xxi1#
错误:undefined method `sub' for nil:NilClass查看您的exception,它看起来像是您没有设置重定向URI,因此出现了错误消息。下面您可以从DocuSign SDK库中找到方法描述:
字符串
您可以在SDK库中查看更多详细信息:https://docusign.github.io/docusign-esign-ruby-client/DocuSign_eSign/Configuration.html#method-i-host-3D