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

pdk (FATAL): Could not locate Gemfile #505

Closed
wtlinnertz opened this issue May 9, 2018 · 5 comments
Closed

pdk (FATAL): Could not locate Gemfile #505

wtlinnertz opened this issue May 9, 2018 · 5 comments
Labels

Comments

@wtlinnertz
Copy link

wtlinnertz commented May 9, 2018

When trying to validate a module that the PDK create I get the following error:

PS H:\puppet\test> pdk validate
pdk (INFO): Running all available validators...
pdk (INFO): Using Ruby 2.4.4
pdk (INFO): Using Puppet 5.5.1
**pdk (FATAL): Could not locate Gemfile**


pdk (FATAL): Unable to resolve Gemfile dependencies.
PS H:\puppet\test> Set-Location -Path H:\puppet\test

But the Gemfile is there.

PS H:\puppet\test> ls


    Directory: H:\puppet\test


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----         05/09/18  11:58 AM                examples
d-----         05/09/18  11:58 AM                files
d-----         05/09/18  11:59 AM                manifests
d-----         05/09/18  11:59 AM                spec
d-----         05/09/18  11:58 AM                tasks
d-----         05/09/18  11:58 AM                templates
d-----         05/09/18  12:19 PM                .vscode
-a----         05/09/18  11:58 AM            229 .fixtures.yml
-a----         05/09/18  11:58 AM             53 .gitattributes
-a----         05/09/18  11:58 AM            283 .gitignore
-a----         05/09/18  11:58 AM           1256 .gitlab-ci.yml
-a----         05/09/18  11:58 AM            283 .pdkignore
-a----         05/09/18  11:58 AM            612 .project
-a----         05/09/18  11:58 AM             33 .rspec
-a----         05/09/18  11:58 AM           3291 .rubocop.yml
-a----         05/09/18  11:58 AM            894 .travis.yml
-a----         05/09/18  11:58 AM             19 .yardopts
-a----         05/09/18  11:58 AM           1337 appveyor.yml
-a----         05/09/18  11:58 AM            157 CHANGELOG.md
**-a----         05/09/18  11:58 AM           3327 Gemfile**
-a----         05/09/18  11:58 AM           1293 metadata.json
-a----         05/09/18  11:58 AM            231 Rakefile
-a----         05/09/18  11:58 AM           4066 README.md
-a----         05/09/18  12:00 PM           4135 Gemfile.lock

Running tests also fails with the same error.

@DavidS
Copy link
Contributor

DavidS commented May 9, 2018

Hi Todd, please post the output from pdk validate --debug so we can understand what's going on there.

If it is possible, please either publish or send a copy of your module to [email protected]

@wtlinnertz
Copy link
Author

Here is the debug output you requested. The email with the module is on its way.

PS H:\puppet\test> pdk validate --debug
pdk (INFO): Running all available validators...
pdk (INFO): Using Ruby 2.4.4
pdk (INFO): Using Puppet 5.5.1
pdk (DEBUG): Checking for missing Gemfile dependencies.
pdk (DEBUG): Using 'C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/bin/bundle.bat' from PDK package.
pdk (DEBUG): Executing 'C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/bin/bundle.bat check --gemfile=H:/puppet/test/Gemfile --dry-run'
pdk (DEBUG): Command environment:
pdk (DEBUG):   PUPPET_GEM_VERSION: 5.5.1
pdk (DEBUG):   GEM_HOME: C:\Users\linertzt\AppData\Local/PDK/cache/ruby/2.4.0
pdk (DEBUG):   GEM_PATH: C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/lib/ruby/gems/2.4.0;C:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.4.0;C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.4.0
pdk (DEBUG):   PATH: C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/bin;C:\Users\linertzt\AppData\Local/PDK/cache/ruby/2.4.0/bin;C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/lib/ruby/gems/2.4.0;C:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.4.0;C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.4.0/bin;C:/Program Files/Puppet Labs/DevelopmentKit/bin;C:\Python27\;C:\Python27\Scripts;C:\Ruby24-x64\bin;C:\Program Files\Docker\Docker\Resources\bin;C:\Program Files\avs\bin;C:\ProgramData\Oracle\Java\javapath;C:\Progra~1\Sybase\DataAccess\ADONET\dll;C:\Progra~1\Sybase\DataAccess\ODBC\dll;C:\Progra~1\Sybase\DataAccess\OLEDB\dll;C:\Progra~1\Sybase\OCS-15_0\lib3p;C:\Progra~1\Sybase\OCS-15_0\dll;C:\Progra~1\Sybase\OCS-15_0\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;C:\PROGRA~1\Mercury\PERFOR~1\java\J-INTE~1\com\bin;C:\PROGRA~1\Mercury\PERFOR~1\DbSetup;C:\PROGRA~1\Mercury\PERFOR~1\bin;C:\Program Files (x86)\Common Files\Hitachi ID\;C:\Program Files\Common Files\Hitachi ID\;C:\Program Files (x86)\Enterprise Vault\EVClient\;C:\Program Files (x86)\WebEx\Productivity Tools;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\ProgramData\chocolatey\bin;C:\Program Files\PuTTY\;C:\Program Files\nodejs\;C:\Program Files (x86)\Sennheiser\SoftphoneSDK\;C:\Program Files\Amazon\AWSCLI\;C:\Program Files\Puppet Labs\Puppet\bin;C:\HashiCorp\Vagrant\bin;C:\Users\linertzt\AppData\Local\Microsoft\WindowsApps;C:\Users\linertzt\AppData\Local\.meteor;C:\Program Files\Oracle\VirtualBox;C:\Users\linertzt\AppData\Roaming\npm;C:\Users\linertzt\AppData\Local\Programs\Git\cmd;C:\Program Files\Microsoft VS Code\bin;C:/Program Files/Puppet Labs/DevelopmentKit/private/git/cmd;C:/Program Files/Puppet Labs/DevelopmentKit/private/git/mingw64/bin;C:/Program Files/Puppet Labs/DevelopmentKit/private/git/mingw64/libexec/git-core;C:/Program Files/Puppet Labs/DevelopmentKit/private/git/usr/bin
pdk (DEBUG): Execution of 'C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/bin/bundle.bat check --gemfile=H:/puppet/test/Gemfile --dry-run' complete (duration: 1.500993s; exit code: 0)
pdk (DEBUG): Updating Gemfile dependencies.
pdk (DEBUG): Using 'C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/bin/bundle.bat' from PDK package.
pdk (DEBUG): Executing 'C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/bin/bundle.bat lock --update --local'
pdk (DEBUG): Command environment:
pdk (DEBUG):   PUPPET_GEM_VERSION: 5.5.1
pdk (DEBUG):   GEM_HOME: C:\Users\linertzt\AppData\Local/PDK/cache/ruby/2.4.0
pdk (DEBUG):   GEM_PATH: C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/lib/ruby/gems/2.4.0;C:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.4.0;C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.4.0
pdk (DEBUG):   PATH: C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/bin;C:\Users\linertzt\AppData\Local/PDK/cache/ruby/2.4.0/bin;C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/lib/ruby/gems/2.4.0;C:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.4.0;C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.4.0/bin;C:/Program Files/Puppet Labs/DevelopmentKit/bin;C:\Python27\;C:\Python27\Scripts;C:\Ruby24-x64\bin;C:\Program Files\Docker\Docker\Resources\bin;C:\Program Files\avs\bin;C:\ProgramData\Oracle\Java\javapath;C:\Progra~1\Sybase\DataAccess\ADONET\dll;C:\Progra~1\Sybase\DataAccess\ODBC\dll;C:\Progra~1\Sybase\DataAccess\OLEDB\dll;C:\Progra~1\Sybase\OCS-15_0\lib3p;C:\Progra~1\Sybase\OCS-15_0\dll;C:\Progra~1\Sybase\OCS-15_0\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;C:\PROGRA~1\Mercury\PERFOR~1\java\J-INTE~1\com\bin;C:\PROGRA~1\Mercury\PERFOR~1\DbSetup;C:\PROGRA~1\Mercury\PERFOR~1\bin;C:\Program Files (x86)\Common Files\Hitachi ID\;C:\Program Files\Common Files\Hitachi ID\;C:\Program Files (x86)\Enterprise Vault\EVClient\;C:\Program Files (x86)\WebEx\Productivity Tools;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\ProgramData\chocolatey\bin;C:\Program Files\PuTTY\;C:\Program Files\nodejs\;C:\Program Files (x86)\Sennheiser\SoftphoneSDK\;C:\Program Files\Amazon\AWSCLI\;C:\Program Files\Puppet Labs\Puppet\bin;C:\HashiCorp\Vagrant\bin;C:\Users\linertzt\AppData\Local\Microsoft\WindowsApps;C:\Users\linertzt\AppData\Local\.meteor;C:\Program Files\Oracle\VirtualBox;C:\Users\linertzt\AppData\Roaming\npm;C:\Users\linertzt\AppData\Local\Programs\Git\cmd;C:\Program Files\Microsoft VS Code\bin;C:/Program Files/Puppet Labs/DevelopmentKit/private/git/cmd;C:/Program Files/Puppet Labs/DevelopmentKit/private/git/mingw64/bin;C:/Program Files/Puppet Labs/DevelopmentKit/private/git/mingw64/libexec/git-core;C:/Program Files/Puppet Labs/DevelopmentKit/private/git/usr/bin
pdk (DEBUG): Execution of 'C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/bin/bundle.bat lock --update --local' complete (duration: 0.897995s; exit code: 10)
pdk (FATAL): Could not locate Gemfile


pdk (FATAL): Unable to resolve Gemfile dependencies.
pdk (DEBUG): C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/lib/ruby/gems/2.4.0/gems/pdk-1.5.0/lib/pdk/util/bundler.rb:184:in `update_lock!'
pdk (DEBUG): C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/lib/ruby/gems/2.4.0/gems/pdk-1.5.0/lib/pdk/util/bundler.rb:46:in `ensure_bundle!'
pdk (DEBUG): C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/lib/ruby/gems/2.4.0/gems/pdk-1.5.0/lib/pdk/cli/validate.rb:91:in `block (2 levels) in <module:CLI>'
pdk (DEBUG): C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/lib/ruby/gems/2.4.0/gems/cri-2.10.1/lib/cri/command.rb:329:in `run_this'
pdk (DEBUG): C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/lib/ruby/gems/2.4.0/gems/cri-2.10.1/lib/cri/command.rb:269:in `run'
pdk (DEBUG): C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/lib/ruby/gems/2.4.0/gems/cri-2.10.1/lib/cri/command.rb:287:in `run'
pdk (DEBUG): C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/lib/ruby/gems/2.4.0/gems/pdk-1.5.0/lib/pdk/cli.rb:18:in `run'
pdk (DEBUG): C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.4.4/lib/ruby/gems/2.4.0/gems/pdk-1.5.0/exe/pdk:6:in `<top (required)>'
pdk (DEBUG): C:/PROGRA~1/PUPPET~1/DEVELO~1/private/ruby/2.4.4/bin/pdk:23:in `load'
pdk (DEBUG): C:/PROGRA~1/PUPPET~1/DEVELO~1/private/ruby/2.4.4/bin/pdk:23:in `<main>'

@scotje
Copy link
Contributor

scotje commented May 9, 2018

Hmmm, it looks like that might be a bug, I'll investigate and see if I can replicate the issue. If the issue is what I suspect, the fix should be fairly simple.

@DavidS
Copy link
Contributor

DavidS commented May 10, 2018

Created PDK-979 for internal tracking.

@scotje
Copy link
Contributor

scotje commented May 25, 2018

We had trouble replicating this issue, however based on the error message I feel like #513 is likely to resolve it.

@wtlinnertz if you are interested in testing with a development build of PDK, please let us know, otherwise the fix will be included in the next official release.

@scotje scotje closed this as completed May 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants