Giter VIP home page Giter VIP logo

Comments (27)

rafaelfranca avatar rafaelfranca commented on September 17, 2024

Just found the reason for this failure. In this line @resource[:config] is usually nil so it will try to call each on nil what cause the failure.

I tried this fix but I endup with this error.

Error: Execution of '/opt/boxen/homebrew/bin/git clone -b v20130408 https://github.com/sstephenson/ruby-build /opt/boxen/rbenv/plugins/ruby-build' returned 128: Cloning into '/opt/boxen/rbenv/plugins/ruby-build'...
fatal: Remote branch  v20130408 not found in upstream origin
Unexpected end of command stream

cc @wfarr

from puppet-ruby.

bleything avatar bleything commented on September 17, 2024

So this is resolved by boxen/puppet-repository#5, which is blocked on boxen/puppet-repository#6. I'll try to get both of those merged today, which should make puppet-repository work again, which should fix this.

from puppet-ruby.

rafaelfranca avatar rafaelfranca commented on September 17, 2024

@bleything good. Let me know if you need some help

from puppet-ruby.

bleything avatar bleything commented on September 17, 2024

Okay, please try again with puppet-repository 2.0.1 and let me know if you're still having this problem.

from puppet-ruby.

rafaelfranca avatar rafaelfranca commented on September 17, 2024

Now I'm getting

Error: Execution of '/opt/boxen/homebrew/bin/git clone -b v20130408 https://github.com/sstephenson/ruby-build /opt/boxen/rbenv/plugins/ruby-build' returned 128: Cloning into '/opt/boxen/rbenv/plugins/ruby-build'...
fatal: Remote branch  v20130408 not found in upstream origin
Unexpected end of command stream

Error: /Stage[main]/Ruby/Repository[/opt/boxen/rbenv/plugins/ruby-build]/ensure: change from absent to present failed: Execution of '/opt/boxen/homebrew/bin/git clone -b v20130408 https://github.com/sstephenson/ruby-build /opt/boxen/rbenv/plugins/ruby-build' returned 128: Cloning into '/opt/boxen/rbenv/plugins/ruby-build'...
fatal: Remote branch  v20130408 not found in upstream origin
Unexpected end of command stream

from puppet-ruby.

bleything avatar bleything commented on September 17, 2024

You're using a positively ancient version of puppet-ruby. Try upgrading to 3.6.0 and see if that helps.

from puppet-ruby.

bleything avatar bleything commented on September 17, 2024

er, I just saw that you said you tried with newer versions of puppet-ruby. If you were seeing the nil error, please upgrade and try again. If not, let me know and I'll try to repro locally.

from puppet-ruby.

rafaelfranca avatar rafaelfranca commented on September 17, 2024

Same problem. I was in 3.5.0 and just upgraded to 3.6.0.

from puppet-ruby.

bleything avatar bleything commented on September 17, 2024

Okay, lemme see if I can get this to happen locally.

from puppet-ruby.

rafaelfranca avatar rafaelfranca commented on September 17, 2024

Reproduction steps:

rm -Rf /opt/boxen/rbenv/plugins/ruby-build/

script/boxen --stealth

from puppet-ruby.

 avatar commented on September 17, 2024

I get the same error in my environment, but found if I copy and paste the command into the terminal it works just fine.

Error: Execution of '/opt/boxen/homebrew/bin/git clone -b v20130408 https://github.com/sstephenson/ruby-build /opt/boxen/rbenv/plugins/ruby-build' returned 128: Cloning into '/opt/boxen/rbenv/plugins/ruby-build'...
fatal: Remote branch  v20130408 not found in upstream origin

from puppet-ruby.

rafaelfranca avatar rafaelfranca commented on September 17, 2024

Yes, same here

from puppet-ruby.

bleything avatar bleything commented on September 17, 2024

Okay, I'm not 100% sure what it is, but something weird is going on in the construction of that command line. Quoting the branch name fixes it. I'll be pushing a new version in a couple of minutes.

from puppet-ruby.

bleything avatar bleything commented on September 17, 2024

Fix released as 3.6.1.

from puppet-ruby.

rafaelfranca avatar rafaelfranca commented on September 17, 2024

Same thing.

Error: Execution of '/opt/boxen/homebrew/bin/git clone -b 'v20130408' https://github.com/sstephenson/ruby-build /opt/boxen/rbenv/plugins/ruby-build' returned 128: Cloning into '/opt/boxen/rbenv/plugins/ruby-build'...
fatal: Remote branch  'v20130408' not found in upstream origin
Unexpected end of command stream

Error: /Stage[main]/Ruby/Ruby::Plugin[ruby-build]/Repository[/opt/boxen/rbenv/plugins/ruby-build]/ensure: change from absent to present failed: Execution of '/opt/boxen/homebrew/bin/git clone -b 'v20130408' https://github.com/sstephenson/ruby-build /opt/boxen/rbenv/plugins/ruby-build' returned 128: Cloning into '/opt/boxen/rbenv/plugins/ruby-build'...
fatal: Remote branch  'v20130408' not found in upstream origin
Unexpected end of command stream

from puppet-ruby.

bleything avatar bleything commented on September 17, 2024

Argh, I can't reproduce it now. Can you show me your complete Puppetfile?

from puppet-ruby.

 avatar commented on September 17, 2024
# This file manages Puppet module dependencies.
#
# It works a lot like Bundler. We provide some core modules by
# default. This ensures at least the ability to construct a basic
# environment.

def github(name, version, options = nil)
  options ||= {}
  options[:repo] ||= "boxen/puppet-#{name}"
  mod name, version, :github_tarball => options[:repo]
end

# Includes many of our custom types and providers, as well as global
# config. Required.

github "boxen", "2.1.0"

# Core modules for a basic development environment. You can replace
# some/most of these if you want, but it's not recommended.

github "dnsmasq",     "1.0.0"
github "gcc",         "1.0.0"
github "git",         "1.2.2"
github "homebrew",    "1.1.2"
github "hub",         "1.0.0"
github "inifile",     "0.9.0", :repo => "cprice-puppet/puppetlabs-inifile"
github "nginx",       "1.1.0"
github "nodejs",      "2.1.0"
github "ruby",        "3.6.1"
github "stdlib",      "3.0.0", :repo => "puppetlabs/puppetlabs-stdlib"
github "sudo",        "1.0.0"
github "repository",  "2.0.1", :repo => "porvak/puppet-repository"

# Optional/custom modules. There are tons available at
# https://github.com/boxen.
github "sublime_text_2",    "1.1.0"
github "alfred",            "1.0.2"
github "intellij",          "1.1.3"
github "bash",              "1.1.0"
github "osx",               "1.1.0"
github "vagrant",           "2.0.6"
github "virtualbox",        "1.0.3", :repo => "porvak/puppet-virtualbox"
github "firefox",           "1.0.1"
github "chrome",            "1.1.0"
github "java",              "1.0.6"
github "phantomjs",         "1.0.0"
github "onepassword",       "1.0.0"
github "dropbox",           "1.0.0"
github "skype",             "1.0.2"
github "wunderlist",        "1.0.0"
github "rubymine",          "1.0.1"
github "hipchat",           "1.0.2"
github "sourcetree",        "0.0.2"
github "soapui",            "1.0.1", :repo => "porvak/puppet-soapui"

from puppet-ruby.

rafaelfranca avatar rafaelfranca commented on September 17, 2024

Exactly this one

from puppet-ruby.

bleything avatar bleything commented on September 17, 2024

Okay, I can reproduce it now. I'll look into this tomorrow.

from puppet-ruby.

bleything avatar bleything commented on September 17, 2024

Had a little more time 👀

This was introduced in puppet-repository 2.0.0. Tomorrow I'll get a proper fix, but in the meantime you should be able to downgrade puppet-repository to 1.0.0 and it should work.

from puppet-ruby.

wfarr avatar wfarr commented on September 17, 2024

This is likely a case of the site manifest with resource defaults not being updated.

On Mon, Apr 22, 2013 at 6:05 PM, Ben Bleything [email protected]
wrote:

Had a little more time 👀

This was introduced in puppet-repository 2.0.0. Tomorrow I'll get a proper fix, but in the meantime you should be able to downgrade puppet-repository to 1.0.0 and it should work.

Reply to this email directly or view it on GitHub:
#19 (comment)

from puppet-ruby.

bleything avatar bleything commented on September 17, 2024

@wfarr can you say more words? I've trimmed my site manifest down to just install a ruby. How would one resolve what you're describing?

from puppet-ruby.

bleything avatar bleything commented on September 17, 2024

I've traced it down to the way the git command is being built. This is the array that's being passed to execute:

["/opt/boxen/homebrew/bin/git", "clone", "-b v20130408", "https://github.com/sstephenson/ruby-build", "/opt/boxen/rbenv/plugins/ruby-build"]

If I run this in irb with exec *that_array it fails the way we see it fail here. If I separate the -b and v20130408 into separate array elements, it works... this is consistent with Ruby's exec not liking spaces in args when passed as an array. I'm assuming that execute in puppet-land eventually passes down to exec.

The most obvious way to fix that is to join the entire command into a string before passing it to execute. I've just confirmed this works and resolves this issue. The PR I just submitted (boxen/puppet-repository#8) is that fix.

from puppet-ruby.

wfarr avatar wfarr commented on September 17, 2024

Released as repository 2.0.2

from puppet-ruby.

kreeger avatar kreeger commented on September 17, 2024

Okay, so I'm not sure if this is a puppet-ruby issue (which, I'm running at 4.0.0) or a puppet-repository issue (which is at 2.0.2), but ruby-build is indeed getting cloned into /opt/boxen/rbenv/plugins/ruby-build, but there's an install.sh script that normally gets run to install ruby-build to /usr/local — and that install.sh script is not getting called as part of the installation.

This means that running rbenv install at a command line complains about no such command.

rbenv: no such command `install'

After running /opt/boxen/rbenv/plugins/ruby-build/install.sh manually, all is well.

from puppet-ruby.

wfarr avatar wfarr commented on September 17, 2024

ruby-build does not require installation into /usr/local at all; you almost certainly have a pre-existing rbenv installation in /usr/local superseding Boxen's in PATH.

from puppet-ruby.

kreeger avatar kreeger commented on September 17, 2024

Ah, I wonder if that's it — I blew away my rbenv just to test this out, and I must have not removed it all. Thanks — guess it's just me!

Ben Kreeger | [email protected] (mailto:[email protected])

On Friday, April 26, 2013 at 1:26 PM, Will Farrington wrote:

ruby-build does not require installation into /usr/local at all; you almost certainly have a pre-existing rbenv installation in /usr/local superseding Boxen's in PATH.


Reply to this email directly or view it on GitHub (#19 (comment)).

from puppet-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.