Ask Your Question

ruby -rpuppet myfunc.rb not working for me

asked 2013-04-09 16:24:25 -0500

Red Cricket gravatar image

updated 2013-04-09 16:47:46 -0500

llowder gravatar image


I want to check my custom puppet function so I do this (like the puppet docs say to do here: ) ...

[root@master functions]# ruby -rpuppet ./channel_query_info.rb
ruby: no such file to load -- puppet (LoadError)
[root@master functions]# ruby -rpuppet channel_query_info.rb
ruby: no such file to load -- puppet (LoadError)

... what am I doing wrong?

edit retag flag offensive close merge delete



What version of puppet? If you try the IRB example, does it work?

llowder gravatar imagellowder ( 2013-04-09 16:49:30 -0500 )edit

I am using PE 2.7.

Red Cricket gravatar imageRed Cricket ( 2013-04-09 17:17:50 -0500 )edit

Ah! I have to do this ... [root@master functions]# /opt/puppet/bin/ruby -rpuppet channel_query_info.rb

Red Cricket gravatar imageRed Cricket ( 2013-04-09 17:20:19 -0500 )edit

Ahh, yeah, PE and Open Source do a few things like that differently, can you set that as an answer so we can get this one marked as answered & accepted?

llowder gravatar imagellowder ( 2013-04-10 10:29:54 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-04-10 10:57:50 -0500

Red Cricket gravatar image

I need to specify the full path to ruby like so ... # /opt/puppet/bin/ruby -rpuppet channel_query_info.rb

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-04-09 16:24:25 -0500

Seen: 63 times

Last updated: Apr 10 '13