Project

General

Profile

Bug #11592

Chef-client returned 'cannot load such file -- OpEN'

Added by ally0620 (Ally Kuo) almost 4 years ago. Updated almost 4 years ago.

Status:
Third Party's Issue
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:71081]

Description

i execute ruby(1.8.7) test.rb returned the correct value without error,
but once i execute it by chef-client it will return as below error:
can anyone help me for the issue?
-------sys info--------

 root@localhost:/usr/bin# ruby -v 
 ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] 
 root@localhost:/usr/bin# uname -a 
 Linux switch1 3.5.0-23-generic #35~precise1 SMP Thu Apr 23 19:34:58 PDT 2015 x86_64 x86_64 x86_64 GNU/Linux 
root@localhost:/usr/bin# which ruby 
/usr/bin/ruby 
root@localhost:/usr/bin# lsb_release -a 
No LSB modules are available. 
Distributor ID: Ubuntu 
Description: Ubuntu 12.04 LTS 
Release: 12.04 
Codename: precise 
root@localhost:/usr/bin# chef-client -v 
Chef: 11.4.0 

------------error----------------------

root@localhost:/usr/bin# chef-client 
Starting Chef Client, version 11.4.0 
resolving cookbooks for run list: ["apt"] 
Synchronizing Cookbooks: 
 - apt 
Compiling Cookbooks...

================================================================================ 
Recipe Compile Error in /var/chef/cache/cookbooks/apt/recipes/default.rb 
================================================================================

LoadError 
--------- 
cannot load such file -- OpEN

Cookbook Trace: 
--------------- 
 /var/chef/cache/cookbooks/apt/recipes/default.rb:11:in `from_file'

Relevant File Content: 
---------------------- 
/var/chef/cache/cookbooks/apt/recipes/default.rb:

4: # 
 5: # Copyright 2015, YOUR_COMPANY_NAME 
 6: # 
 7: # All rights reserved - Do Not Redistribute 
 8: # 
 9: 
 10: 
 11>> require "OpEN" 
 12: require "OpENUtil" 
 13: 
 14: open = OpENUtil.new() 
 15: conn_ret = open.connect("boa-vlan") 
 16: exists = false 
 17: if conn_ret == OpEN::OPEN_E_NONE 
 18: client = open.client 
 19: ret = OpEN::openapiVlanCreatedCheck(client,1) 
 20: if ret == OpEN::OPEN_E_NONE

[2015-10-14T01:44:54+00:00] ERROR: Running exception handlers 
[2015-10-14T01:44:55+00:00] FATAL: Saving node information to /var/chef/cache/failed-run-data.json 
[2015-10-14T01:44:55+00:00] ERROR: Exception handlers complete 
Chef Client failed. 0 resources updated 
[2015-10-14T01:44:55+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out 
[2015-10-14T01:44:55+00:00] FATAL: LoadError: cannot load such file -- OpEN 


Files

test.rb (494 Bytes) test.rb ally0620 (Ally Kuo), 10/14/2015 03:41 AM
OpENUtil.rb (2.78 KB) OpENUtil.rb ally0620 (Ally Kuo), 10/14/2015 03:41 AM
OpEN.so (1.63 MB) OpEN.so ally0620 (Ally Kuo), 10/14/2015 03:41 AM

History

Updated by nobu (Nobuyoshi Nakada) almost 4 years ago

  • Description updated (diff)
  • Status changed from Open to Third Party's Issue

Use the ruby embedded in chef.

Updated by ally0620 (Ally Kuo) almost 4 years ago

how can i use embedded ruby?

Also available in: Atom PDF