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).

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

2. Install ruby and gems

1
sudo apt-get install rubygems ruby1.8

3. Install Vagrant

1
sudo gem install vagrant

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

1
2
3
4
5
6
7
8
9
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.

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

4. Configure Vagrant

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

5. Start Login into Vagrant

1
vagrant ssh

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

Happy working on tiny virtual environment 🙂


Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.