Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method strip #990

Closed
Elbandi opened this issue Sep 18, 2020 · 8 comments
Closed

undefined method strip #990

Elbandi opened this issue Sep 18, 2020 · 8 comments
Labels
invalid This doesn't seem right

Comments

@Elbandi
Copy link

Elbandi commented Sep 18, 2020

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.4.0
  • Ruby: 2.5.1
  • Distribution: ubuntu 18.04
  • Module version: 2.0.1

How to reproduce (e.g Puppet code you use)

    include jenkins

What are you seeing

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, undefined method `strip' for []:Array (file: /etc/puppet/code/modules/jenkins/manifests/plugin.pp, line: 115, column: 16) (file: /etc/puppet/code/modules/jenkins/manifests/config.pp, line: 6) on node

What behaviour did you expect instead

install the jenkins

@Elbandi
Copy link
Author

Elbandi commented Sep 18, 2020

possible solution?
default => split(strip($facts['jenkins_plugins']), ','),

@igalic
Copy link
Contributor

igalic commented Sep 18, 2020

do you have puppetlabs/stdlib and the other dependencies installed?

@Elbandi
Copy link
Author

Elbandi commented Sep 19, 2020

There is a etc/puppet/code/modules/stdlib/lib/puppet/parser/functions/strip.rb file.

Other dependencies are exists too, only puppet version is less as requested, but i think it's irrelevant for this line.

@igalic
Copy link
Contributor

igalic commented Sep 19, 2020

the strip function in stdlib exists since 2.3.0: puppetlabs/puppetlabs-stdlib@16eec26
which version do you have installed? and is it picked up in the environment that Jenkins runs in?

@Elbandi
Copy link
Author

Elbandi commented Sep 21, 2020

Oh, my fail :(
there was an another strip function in my puppet, and override the stdlib's strip func. i removed the "pirate" strip.rb file, and now look like it works.

@Elbandi Elbandi closed this as completed Sep 21, 2020
@igalic
Copy link
Contributor

igalic commented Sep 21, 2020

can you tell us which module that came from?

@Elbandi
Copy link
Author

Elbandi commented Sep 29, 2020

it's an own module. we use puppet long time ago, maybe someone wrote that "ghost" strip before we started to stdlib :/

@igalic
Copy link
Contributor

igalic commented Sep 29, 2020

thank you for the explanation!

@alexjfisher alexjfisher added the invalid This doesn't seem right label Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants