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

safe_yaml not found #137

Closed
jaypipes opened this issue Jun 3, 2013 · 8 comments
Closed

safe_yaml not found #137

jaypipes opened this issue Jun 3, 2013 · 8 comments

Comments

@jaypipes
Copy link

jaypipes commented Jun 3, 2013

$ bundle install
<snip>
Using safe_yaml (0.9.2) 
Using strainer (2.1.0) 
Using test-kitchen (1.0.0.alpha.6) 
Using bundler (1.2.3) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
jpipes@uberbox:~/repos/jaypipes/cookbook-galera$ bundle exec kitchen init
D, [2013-06-03T18:18:12.113016 #12123] DEBUG -- : Shutdown completed cleanly
/var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.alpha.6/lib/kitchen/loader/yaml.rb:21:in `require': cannot load such file -- safe_yaml (LoadError)
    from /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.alpha.6/lib/kitchen/loader/yaml.rb:21:in `<top (required)>'
    from /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.alpha.6/lib/kitchen.rb:39:in `require'
    from /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.alpha.6/lib/kitchen.rb:39:in `<top (required)>'
    from /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.alpha.6/lib/kitchen/cli.rb:24:in `require'
    from /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.alpha.6/lib/kitchen/cli.rb:24:in `<top (required)>'
    from /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.alpha.6/bin/kitchen:10:in `require'
    from /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.alpha.6/bin/kitchen:10:in `<top (required)>'
    from /usr/local/bin/kitchen:23:in `load'
    from /usr/local/bin/kitchen:23:in `<main>'
jpipes@uberbox:~/repos/jaypipes/cookbook-galera$ gem query --local | grep safe_yaml
safe_yaml (0.9.2)

Any ideas?

@spheromak
Copy link

yea looks like something is up and TK isn't providing the deps in the gemfile ? add

   gem "safe_yaml"  

to your Gemfile, run bundle install, and bundle exec again.. Should work.. (worked for me)

@jaypipes
Copy link
Author

jaypipes commented Jun 3, 2013

Unfortunately, I get the same error. Tried bundle update and bundle install, and then bundle exec kitchen init, and get same traceback :(

@josephholsten
Copy link
Contributor

I dug into this today and I discovered that safe_yaml.rb had a file mode of 640. That means that regular users could not load the file at all. I'm not sure why that would happen to multiple people unless something is wrong in the gem or the install process.

I'll be checking both.

@josephholsten
Copy link
Contributor

Ayup, this is due to a broken file mode in the actual contents of the safe_yaml gem. I've added a ticket upstream: dtao/safe_yaml#40. As a workaround, you should be able to install the gems via `bundle install vendor/bundle' to ensure they are owned by the process user.

I'm sorry this sucks.

@josephholsten
Copy link
Contributor

oh, the fix will be a version bump of the gem.add_dependency 'safe_yaml' in test-kitchen.gemspec:29.

@fnichol
Copy link
Contributor

fnichol commented Jun 4, 2013

Wow, that's a first, it didn't even occur to me that file permissions are transfered

@josephholsten
Copy link
Contributor

Looks like safe_yaml 0.9.3 has been released to fix this.

josephholsten added a commit to josephholsten/test-kitchen that referenced this issue Jun 6, 2013
@jaypipes
Copy link
Author

jaypipes commented Jun 6, 2013

Verified. kitchen init now working after a bundle update. Thanks!

@jaypipes jaypipes closed this as completed Jun 6, 2013
fnichol added a commit that referenced this issue Jul 17, 2013
require a safe_yaml release with correct permissions. Fixes #137
@test-kitchen test-kitchen locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants