X4 / gentoo-rebel

The Chamber of a Rebel – Servers, Tools and Widgets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vagrant ebuild produces broken CLI

lrvick opened this issue · comments

sudo emerge \=app-emulation/vagrant-1.6.3 --autounmask-write

Then I go to use it:

vagrant up                                                                                       master 
/usr/lib64/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- bundler (LoadError)
    from /usr/lib64/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/lib64/ruby/gems/2.1.0/gems/vagrant-1.6.3/lib/vagrant/bundler.rb:6:in `<top (required)>'
    from /usr/lib64/ruby/gems/2.1.0/gems/vagrant-1.6.3/lib/vagrant/pre-rubygems.rb:19:in `require_relative'
    from /usr/lib64/ruby/gems/2.1.0/gems/vagrant-1.6.3/lib/vagrant/pre-rubygems.rb:19:in `<main>'

This is the only ebuild I can find for vagrant > 1.6 which is required for use with coreos. If you have any insight I would appreciate it!

Exactly the same Problem here.
Tried with ruby 19 - 21 and manually emerged dev-ruby/bundler.

Has anyone found a fix for this? I have the same problem.

commented

@mxmo0rhuhn @ravloony @lrvick
Sorry, I didn't get notifications for this issue. It just went unnoticed. I'll try to help you out with that (hopefully tonight or on sunday).

Any news on this @X4? This would save my day :)

same problem

I've emerged dev-ruby/bundler-1.7.13::gentoo but not help

Issue still present with dev-ruby/bundler-1.10.6::gentoo

I am also having this issue.

My guess is that the fakegem eclass is somehow not working or improperly invoked. You can see in the ebuild that the dependencies are supposed to be handled by fakegem (RUBY_FAKEGEM_GEMSPEC="vagrant.gemspec"), so I suspect attempts to fix this by emerging dev-ruby/bundler are misguided.

I don't know enough to explore this possibility at this point though, so I'll probably just install manually from source.

Hmm, installing from source seems to work, but the moment I change directories out of the vagrant source directory I get the same bundler error. Guess I need to learn more about ruby path management.

I can't make much sense of the way ruby handles load paths, but I found I was able to get rid of some of the LoadError's by manually adding libraries to the LOAD_PATH in /usr/bin/vagrant:

#!/usr/bin/ruby20
# This is a simplified version of the RubyGems wrapper
#
# Generated by ruby-fakegem.eclass : 1.45 $

require 'rubygems'

$LOAD_PATH.unshift("/usr/lib/ruby/gems/2.0.0/gems/bundler-1.9.10/lib")
$LOAD_PATH.unshift("/usr/lib/ruby/gems/2.0.0/gems/log4r-1.1.10/lib")
$LOAD_PATH.unshift("/usr/lib/ruby/gems/2.0.0/gems/vagrant-1.7.4/lib")
$LOAD_PATH.unshift("/usr/lib/ruby/gems/2.0.0/gems/childprocess-0.5.8/lib")

load Gem::default_path[-1] + "/gems/vagrant-1.7.4/bin/vagrant"

Unfortunately this left me with an even more confounding error:

/usr/lib/ruby/gems/2.0.0/gems/bundler-1.9.10/lib/bundler/resolver.rb:328:in `block in verify_gemfile_dependencies_are_found!': Could not find gem 'vagrant (= 1.7.4) ruby' in any of the gem sources listed in your Gemfile or installed on this machine. (Bundler::GemNotFound)
    from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.9.10/lib/bundler/resolver.rb:307:in `each'
    from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.9.10/lib/bundler/resolver.rb:307:in `verify_gemfile_dependencies_are_found!'
    from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.9.10/lib/bundler/resolver.rb:199:in `start'
    from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.9.10/lib/bundler/resolver.rb:182:in `resolve'
    from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.9.10/lib/bundler/definition.rb:192:in `resolve'
    from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.9.10/lib/bundler/definition.rb:132:in `specs'
    from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.9.10/lib/bundler/definition.rb:177:in `specs_for'
    from /usr/lib/ruby/gems/2.0.0/gems/vagrant-1.7.4/lib/vagrant.rb:76:in `<top (required)>'
    from /usr/lib64/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/lib64/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/lib64/ruby/gems/2.0.0/gems/vagrant-1.7.4/bin/vagrant:105:in `<top (required)>'
    from /usr/bin/vagrant:13:in `load'
    from /usr/bin/vagrant:13:in `<main>'

Well vagrant 1.8.1 was just released on the gentoo portage tree. I'm glad somebody else solved it because I was clearly getting nowhere.

I suppose this issue can be closed.