104ru / crowdstrike

Puppet module to deploy and manage CrowdStrike agent
1 stars 11 forks source link

Could not find gem 'puppet-module-posix-default-r3.1 (~> 1.0)' in rubygems repository https://rubygems.org/ or installed locally. #22

Closed bschonec closed 8 months ago

bschonec commented 9 months ago

On Red Hat EL 8.9 and using ruby 3.1.2p20, I get the following error:

bundle install Could not find gem 'puppet-module-posix-default-r3.1 (~> 1.0)' in rubygems repository https://rubygems.org/ or installed locally.

A search at ruby.org shows that no version higher than 2.7 is available for puppet-module-posix-default.

I don't know anything about Ruby so I don't know how to fix this.

104ru commented 8 months ago

I am not sure what you are trying to do. This is a puppet module, so it should be invoked by puppet agent, which comes with its own ruby distribution and a necessary set of gems installed.

bschonec commented 8 months ago

This is for running the tests from the command line. Since there is no puppet-module-posix-default gem higher than 2.7, the spec tests fail as bundle-er cannot find an appropriate gem. 'bundle install' doesn't fail on RHEL7 but it does fail on RHEL8 and above (typically, because Ruby 3.x is the default for those releases). Probably what needs to happen is a "pdk update" (or whatver the command is) to update the Gemfile to newer standards."

bschonec commented 8 months ago

Something like #23. This updates Gemfile, Rakefile and a few other things that do fix the ruby gem version problem.

104ru commented 8 months ago

I see, you've got newer PDK. Updated PDK to 3.0 and pushed under a new tag v1.4.7. Check it out.

bschonec commented 8 months ago

spec/classes/crowdstrike_spec.rb needs to have the check for "unalbe to parse falconctl" fixed to match the error that manifests/init.pp gives... #21 addressed the typo but I didn't have any experience on spec tests so I didn't know to update the spec .rb file.

104ru commented 8 months ago

Fixed and pushed to forge as v1.4.7.