Skip to content

Commit

Permalink
Vagrant file fix for ubuntu/trusty64 (#769)
Browse files Browse the repository at this point in the history
* Fix screenshot link in readme

* Vagrant file fix for ubuntu/trusty64
  • Loading branch information
MEGApixel23 authored and lord committed May 14, 2017
1 parent 39aaa0f commit 0d58606
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<p align="center">Slate helps you create beautiful, intelligent, responsive API documentation.</p>

<p align="center"><img src="https://dl.dropboxusercontent.com/u/95847291/github%20images/slate/slate_screenshot_new.png" width=700 alt="Screenshot of Example Documentation created with Slate"></p>
<p align="center"><img src="https://raw.githubusercontent.com/lord/img/master/screenshot-slate.png" width=700 alt="Screenshot of Example Documentation created with Slate"></p>

<p align="center"><em>The example above was created with Slate. Check it out at <a href="https://lord.github.io/slate">lord.github.io/slate</a>.</em></p>

Expand Down
33 changes: 14 additions & 19 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
Vagrant.configure(2) do |config|
config.vm.box = "debian/jessie64"
config.vm.box = "ubuntu/trusty64"
config.vm.network :forwarded_port, guest: 4567, host: 4567
config.vm.synced_folder ".", "/vagrant", type: "rsync"

# Download and install ruby from sources and other tools
config.vm.provision "shell",
config.vm.provision "bootstrap",
type: "shell",
inline: <<-SHELL
apt-get -yq install zlib1g-dev libssl-dev libreadline-dev libgdbm-dev openssl git libxml2-dev libxslt-dev build-essential nodejs
wget https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.gz
tar xvfz ruby-2.4.0.tar.gz
cd ruby-2.4.0
./configure
make
make install
gem install --no-ri --no-rdoc bundler
rm -rf ruby-2.4.0.tar.gz ruby-2.4.0
apt-get autoremove -yq
sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get install -yq ruby2.2 ruby2.2-dev
sudo apt-get install -yq pkg-config build-essential nodejs git libxml2-dev libxslt-dev
sudo apt-get autoremove -yq
gem2.2 install --no-ri --no-rdoc bundler
SHELL

# add the local user git config to the vm
config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig"

# Install project dependencies (gems)
config.vm.provision "shell",
config.vm.provision "install",
type: "shell",
privileged: false,
inline: <<-SHELL
echo "=============================================="
Expand All @@ -32,8 +27,8 @@ Vagrant.configure(2) do |config|
bundle install
SHELL

# Exec server
config.vm.provision "shell",
config.vm.provision "run",
type: "shell",
privileged: false,
run: "always",
inline: <<-SHELL
Expand All @@ -43,4 +38,4 @@ Vagrant.configure(2) do |config|
cd /vagrant
bundle exec middleman server --watcher-force-polling --watcher-latency=1 &> ~/middleman.log &
SHELL
end
end

0 comments on commit 0d58606

Please sign in to comment.