Install and configure Vagrant on Ubuntu Oneiric 11.10

Installing Vagrant on Ubuntu 11.04 using base tutorial on vagrantup.com will give success result. But not with Ubuntu Oneiric. This is because gem path changes and “Invalid gemspec invalid date format in specification”.

Here are right steps to install & run Vagrant on Ubuntu 11.10 :

1. Install & Configuring Virtualbox
Go to https://www.virtualbox.org/wiki/Linux_Downloads and install as your Ubuntu Oneiric version (32 or 64 bit).


A. Install by "sudo dpkg -i virtualbox-package.deb".
B. Add your users into vbox group

2. Install ruby and gems
sudo apt-get install rubygems ruby1.8

3. Install Vagrant
sudo gem install vagrant

After installing, when you type “vagrant”, you will get error like this :


Invalid gemspec in [/var/lib/gems/1.8/specifications/json-1.5.4.gemspec]: invalid date format in specification: "2011-08-31 00:00:00.000000000Z"
/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `gem_original_require': no such file to load -- json (LoadError)
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `require'
from /var/lib/gems/1.8/gems/vagrant-0.8.7/lib/vagrant.rb:2
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `gem_original_require'
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `require'
from /var/lib/gems/1.8/gems/vagrant-0.8.7/bin/vagrant:2
from /usr/local/bin/vagrant:19:in `load'
from /usr/local/bin/vagrant:19

Fix this problem by removing “00:00:00.000000000Z” on “s.date” in /var/lib/gems/1.8/specifications/json-1.5.4.gemspec.


s.date = %q{2011-08-31}

4. Configure Vagrant


vagrant box add base http://files.vagrantup.com/lucid32.box
vagrant init
vagrant up

5. Start Login into Vagrant


vagrant ssh

Now you already login into lucid32 VM. Wanna create your custom Box? read this Vagrant guide

Happy working on tiny virtual environment :)

6 thoughts on “Install and configure Vagrant on Ubuntu Oneiric 11.10

  1. Thank you for this workaround!

    I had Vagrant installed and running on 11.04, but after I upgraded to 11.10 Vagrant fails. For me, the only step necessary from this guide was editing the json-1.5.4.gemspec file.

  2. These instructions almost worked for me, but I had existing boxes from 11.04 and needed another step, because of a change in the parameters to config.vm.network. The error instructed me to add a :hostonly parameter first, but this did not work.

    It took some digging to realize I needed to edit an included config from ~/.vagrant.d/boxes/dev/include/_Vagrantfile

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>