Skip to content

Instantly share code, notes, and snippets.

@tonicospinelli
Created November 27, 2013 15:47
Show Gist options
  • Save tonicospinelli/7677888 to your computer and use it in GitHub Desktop.
Save tonicospinelli/7677888 to your computer and use it in GitHub Desktop.
Jekyll server in Vagrant
Vagrant.configure("2") do |config|
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
config.vm.network :forwarded_port, guest: 4000, host: 4000
$script = <<SCRIPT
sudo -i
/usr/local/rvm/bin/gem install directory_watcher -v 1.4.1
/usr/local/rvm/bin/gem install jekyll rdiscount --no-ri --no-rdoc
cd /vagrant
jekyll server --watch --detach --port 4000
SCRIPT
config.vm.provision :shell, :inline => "sudo apt-get update && apt-get -y install build-essential curl && \\curl -L https://get.rvm.io | bash -s stable --ruby"
config.vm.provision :shell, :inline => $script
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment