Project

General

Profile

Bug #1651

Updated by Martin Bacovsky over 11 years ago

<pre> 
 
 $ foremancli -s https://foreman.example.com --fact_values 'fact.name = operatingsystem' 
 
 /var/lib/gems/1.8/gems/foremancli-0.4.1/bin/foremancli:185:in `print_response': undefined method `join' for #<Hash:0x7fb33b963598> (NoMethodError) 
         
         from /var/lib/gems/1.8/gems/foremancli-0.4.1/bin/foremancli:194 
         
         from /var/lib/gems/1.8/gems/foremancli-0.4.1/bin/foremancli:189:in `each' 
         
         from /var/lib/gems/1.8/gems/foremancli-0.4.1/bin/foremancli:189 
         
         from /usr/local/bin/foremancli:19:in `load' 
         
         from /usr/local/bin/foremancli:19 
 
 </pre> 

 

 Debug Output: 

 

 <pre> 
 
 $ foremancli -ds https://foreman.example.com --fact_values 'fact.name = operatingsystem' 
 
 RestClient.get "https://foreman.example.com/fact_values?search=fact.name%20=%20operatingsystem", "Accept"=>"application/json", "Accept-Encoding"=>"gzip, deflate", "Content-Type"=>"application/json" 
 
 # => 200 OK | application/json 14936 bytes 
 
 /var/lib/gems/1.8/gems/foremancli-0.4.1/bin/foremancli:185:in `print_response': undefined method `join' for #<Hash:0x7ff91b0fec10> (NoMethodError) 
         
         from /var/lib/gems/1.8/gems/foremancli-0.4.1/bin/foremancli:194 
         
         from /var/lib/gems/1.8/gems/foremancli-0.4.1/bin/foremancli:189:in `each' 
         
         from /var/lib/gems/1.8/gems/foremancli-0.4.1/bin/foremancli:189 
         
         from /usr/local/bin/foremancli:19:in `load' 
         
         from /usr/local/bin/foremancli:19 
 
 </pre> 

 

 Looks like the output here is an array of nested hashes, and the output filter is choking on it? 

 

 -torrancew

Back