rvm/rubygems-bundler

rubygems-bundler: vagrant fails with "Could not locate Gemfile (Bundler::GemfileNotFound)

kmself-vm opened this issue · 5 comments

Invoking 'vagrant' fails on startup with this message.

To reproduce:

$ vagrant -h
Error loading RubyGems plugin "/home/karsten/.rvm/gems/ruby-1.9.3-p125@global/gems/rubygems-bundler-1.0.2/lib/rubygems_plugin.rb": Could not locate Gemfile (Bundler::GemfileNotFound)
Error loading RubyGems plugin "/home/karsten/.rvm/gems/ruby-1.9.3-p125@global/gems/rubygems-bundler-1.0.2/lib/rubygems_plugin.rb": Could not locate Gemfile (Bundler::GemfileNotFound)
Usage: vagrant [-v] [-h] command []

-v, --version                    Print the version and exit.
-h, --help                       Print this help.

Available subcommands:
box
destroy
gem
halt
init
package
provision
reload
resume
ssh
ssh-config
status
suspend
up

For help on any individual command run vagrant COMMAND -h

Additional diagnostics:
$ NOEXEC=0 vagrant -h
Error loading RubyGems plugin "/home/karsten/.rvm/gems/ruby-1.9.3-p125@global/gems/rubygems-bundler-1.0.2/lib/rubygems_plugin.rb": Could not locate Gemfile (Bundler::GemfileNotFound)
Error loading RubyGems plugin "/home/karsten/.rvm/gems/ruby-1.9.3-p125@global/gems/rubygems-bundler-1.0.2/lib/rubygems_plugin.rb": Could not locate Gemfile (Bundler::GemfileNotFound)
Usage: vagrant [-v] [-h] command []

-v, --version                    Print the version and exit.
-h, --help                       Print this help.

Available subcommands:
box
destroy
gem
halt
init
package
provision
reload
resume
ssh
ssh-config
status
suspend
up

For help on any individual command run vagrant COMMAND -h

ruby -rbundler -e "puts Bundler.settings[:disable_shared_gems]"
/home/karsten/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.4/lib/bundler/shared_helpers.rb:22:in default_gemfile': Could not locate Gemfile (Bundler::GemfileNotFound) from /home/karsten/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.4/lib/bundler.rb:213:indefault_gemfile'
from /home/karsten/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.4/lib/bundler.rb:164:in root' from /home/karsten/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.4/lib/bundler.rb:170:inapp_config_path'
from /home/karsten/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.4/lib/bundler.rb:182:in settings' from -e:1:in

'

Workaround:

17:45 @mpapis karsten, what's interesting I do the same and I had not found
it before ... for workaround uninstall rubygems-bundler or
create Gemfile with vagrant gem

Uninstalled using "rvm uninstall rubygems-bundler". Seems to avoid the initial problem. Not sure vagrant's happy yet.

please update to 1.0.3 this should fix the warning, let me know how it worked

Works :)

fxn commented

It is happening here with 1.0.3:

fxn@yeager:~ $ vagrant -v
Vagrant version 1.0.3
fxn@yeager:~ $ vagrant -h | head
Error loading RubyGems plugin "/Users/fxn/.rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.2/lib/rubygems_plugin.rb": Could not locate Gemfile (Bundler::GemfileNotFound)
Error loading RubyGems plugin "/Users/fxn/.rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.2/lib/rubygems_plugin.rb": Could not locate Gemfile (Bundler::GemfileNotFound)
Usage: vagrant [-v] [-h] command [<args>]

    -v, --version                    Print the version and exit.
    -h, --help                       Print this help.

Available subcommands:
     box
     destroy
     gem
     halt

As seen in the trace above, ruby is 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.2] running RVM.

@fxn do you have Gemfile or $BUNDLE_GEMFILE - if yes do they reference vagrant, and is there corresponding .bundle/config ?