Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/60.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 未定义的方法`<<';对于true:TrueClass_Ruby On Rails_Rest Client - Fatal编程技术网

Ruby on rails 未定义的方法`<<';对于true:TrueClass

Ruby on rails 未定义的方法`<<';对于true:TrueClass,ruby-on-rails,rest-client,Ruby On Rails,Rest Client,我(对我来说)有一个奇怪的错误,我不明白为什么会发生这种情况 有时当我调用RestClient.get'http://google.com“我得到了一个响应,有时我得到了这个错误未定义的方法”您的RestClient.log设置为true。通过截取setter找到发生这种情况的地方: def RestClient.log=(value) raise "HERE!" end 然后等待异常被触发,从堆栈跟踪中查看谁分配了愚蠢的值。:) 您能否显示处理来自http://google.com,而你

我(对我来说)有一个奇怪的错误,我不明白为什么会发生这种情况


有时当我调用
RestClient.get'http://google.com“
我得到了一个响应,有时我得到了这个错误
未定义的方法”您的
RestClient.log
设置为
true
。通过截取setter找到发生这种情况的地方:

def RestClient.log=(value)
  raise "HERE!"
end

然后等待异常被触发,从堆栈跟踪中查看谁分配了愚蠢的值。:)

您能否显示处理来自
http://google.com
,而你的用户
@Nermin:他没有。RestClient有。
def RestClient.log=(value)
  raise "HERE!"
end