Re: Can I use non-embedded ruby in vagrant?

1,710 views
Skip to first unread message

Kevin Kaland

unread,
Feb 10, 2013, 3:56:46 AM2/10/13
to vagra...@googlegroups.com
Currently, you can't. I asked the author about if Vagrant still worked directly with Rake and got a no precisely because of this.

If you want to integrate with Vagrant, you have to do it by shelling out.

All that said, the downloadable Vagrant packages should install without issue and be self-contained. I also use Mac OS X (although 10.7).

On Monday, February 4, 2013 6:10:45 AM UTC+1, Jay Zhu wrote:
Hi - 

I am new to vagrant. I am trying to experiment it on my Mac OSX 10.8, with the tutorial http://leopard.in.ua/2013/01/04/chef-solo-getting-started-part-1/

I followed the tutorial, expect that I didn't install vagrant from bundle, instead I downloaded the package and installed it as it seems to be the way recommended by document: http://docs.vagrantup.com/v1/docs/getting-started/index.html. I thus removed the line 'gem 'vagrant', "~> 1.0.5"' from the Gemfile.

After I set everything up, and I can run knife solo successfully. However when I run 'vagrant up' I see the following error:

/Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- bundler (LoadError)
from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/jay/Development/projects/playground/chef-solo-example/Vagrantfile:5:in `<top (required)>'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/config/loader.rb:115:in `load'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/config/loader.rb:115:in `block in procs_for_source'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/config.rb:41:in `block in capture_configures'
from <internal:prelude>:10:in `synchronize'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/config.rb:36:in `capture_configures'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/config/loader.rb:114:in `procs_for_source'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/config/loader.rb:51:in `block in set'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/config/loader.rb:45:in `each'
       ....

The following is my ruby information (from rvm info): 
ruby-1.9.3-p374:

  system:
    uname:       "Darwin Jays-MacBook-Pro.local 12.2.1 Darwin Kernel Version 12.2.1: Thu Oct 18 16:32:48 PDT 2012; root:xnu-2050.20.9~2/RELEASE_X86_64 x86_64"
    system:      "osx/10.8/x86_64"
    bash:        "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin12)"
    zsh:         "/bin/zsh => zsh 4.3.11 (i386-apple-darwin12.0)"

  rvm:
    version:      "rvm 1.18.5 (stable) by Wayne E. Seguin <waynee...@gmail.com>, Michal Papis <mpa...@gmail.com> [https://rvm.io/]"
    updated:      "14 hours 32 minutes 56 seconds ago"

  ruby:
    interpreter:  "ruby"
    version:      "1.9.3p374"
    date:         "2013-01-15"
    platform:     "x86_64-darwin12.2.1"
    patchlevel:   "2013-01-15 revision 38858"
    full_version: "ruby 1.9.3p374 (2013-01-15 revision 38858) [x86_64-darwin12.2.1]"

So I suppose that the issue is caused by vagrant is using its embedded ruby instead of the one specified by rvm. Is there anyway to use ruby in my system instead of the embedded one?

Thanks in advance for any help and suggestions!

Thanks,
Jay

gareth rushgrove

unread,
Feb 10, 2013, 6:36:30 AM2/10/13
to vagra...@googlegroups.com
On 4 February 2013 05:10, Jay Zhu <tingj...@gmail.com> wrote:
> Hi -
>
> I am new to vagrant. I am trying to experiment it on my Mac OSX 10.8, with
> the tutorial
> http://leopard.in.ua/2013/01/04/chef-solo-getting-started-part-1/
>
> I followed the tutorial, expect that I didn't install vagrant from bundle,
> instead I downloaded the package and installed it as it seems to be the way
> recommended by document:
> http://docs.vagrantup.com/v1/docs/getting-started/index.html. I thus removed
> the line 'gem 'vagrant', "~> 1.0.5"' from the Gemfile.
>
> After I set everything up, and I can run knife solo successfully. However
> when I run 'vagrant up' I see the following error:
>

This error is being caused because of the the Vagrantfile in the
example, specifically the line

require 'bundler'

Vagrant has it's own Ruby and it's own set of gems. Which means when
the Vagrantfile hits that line it fails to load bundler, because it's
not available. You might be able to get somewhere with:

vagrant gem install bundler

In reality what you actually require is multi_json, so I'd be tempted
to remove the bundler references from the Vagrantfile and do

vagrant gem install multi_json


The Vagrantfile is just Ruby code, which makes it powerful but also
means if you're using things from outside the standard library you
need to understand a bit of the rabbit warren that is Ruby library
support.

Gareth
> --
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vagrant-up+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Gareth Rushgrove
Web Geek

morethanseven.net
garethrushgrove.com

bot 4

unread,
Jul 3, 2018, 1:55:01 PM7/3/18
to Vagrant
Hi,

It's 2018 now, is there a way to quote "Is there anyway to use ruby in my system instead of the embedded one?"

Alvaro Miranda Aguilera

unread,
Jul 4, 2018, 10:56:25 AM7/4/18
to vagra...@googlegroups.com
No.

Vagrant is distributed with an installed now,

whats the problem using the installer and the environment that came with it?

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/d20bd129-9af3-4070-bfaa-0fec33f2f248%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

bot 4

unread,
Jul 5, 2018, 6:56:29 AM7/5/18
to Vagrant
Hi,

Was trying a different approach to another problem, solved it by finding the required updated vagrant version.

To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.



--
Alvaro

Reply all
Reply to author
Forward
0 new messages