Skip to content

Commit 7b1e718

Browse files
Benjamin Chenebaultlord
authored andcommitted
A Vagrantfile based on debian/jessie64 (#708)
* Add VagrantFile compatible from debian/jessie64 box and latest ruby stable version (2.4.0) * Fix indent in vagrantfile for jessie64 * Remove Vagrantfile for Jessie * Replace Vagrantfile with debian/jessie and last ruby version
1 parent 61d7f08 commit 7b1e718

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

‎Vagrantfile‎

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
11
Vagrant.configure(2) do |config|
2-
config.vm.box = "ubuntu/trusty64"
2+
config.vm.box = "debian/jessie64"
33
config.vm.network :forwarded_port, guest: 4567, host: 4567
4+
config.vm.synced_folder ".", "/vagrant", type: "rsync"
45

5-
config.vm.provision "bootstrap",
6-
type: "shell",
6+
# Download and install ruby from sources and other tools
7+
config.vm.provision "shell",
78
inline: <<-SHELL
8-
sudo apt-get update
9-
sudo apt-get install -yq ruby2.0 ruby2.0-dev pkg-config build-essential nodejs git libxml2-dev libxslt-dev
10-
sudo apt-get autoremove -yq
11-
gem2.0 install --no-ri --no-rdoc bundler
9+
apt-get -yq install zlib1g-dev libssl-dev libreadline-dev libgdbm-dev openssl git libxml2-dev libxslt-dev build-essential nodejs
10+
wget https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.gz
11+
tar xvfz ruby-2.4.0.tar.gz
12+
cd ruby-2.4.0
13+
./configure
14+
make
15+
make install
16+
gem install --no-ri --no-rdoc bundler
17+
rm -rf ruby-2.4.0.tar.gz ruby-2.4.0
18+
apt-get autoremove -yq
1219
SHELL
1320

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

17-
config.vm.provision "install",
18-
type: "shell",
24+
# Install project dependencies (gems)
25+
config.vm.provision "shell",
1926
privileged: false,
2027
inline: <<-SHELL
2128
echo "=============================================="
@@ -25,15 +32,15 @@ Vagrant.configure(2) do |config|
2532
bundle install
2633
SHELL
2734

28-
config.vm.provision "run",
29-
type: "shell",
35+
# Exec server
36+
config.vm.provision "shell",
3037
privileged: false,
3138
run: "always",
3239
inline: <<-SHELL
3340
echo "=============================================="
3441
echo "Starting up middleman at http://localhost:4567"
3542
echo "If it does not come up, check the ~/middleman.log file for any error messages"
3643
cd /vagrant
37-
bundle exec middleman server --force-polling --latency=1 &> ~/middleman.log &
44+
bundle exec middleman server --watcher-force-polling --watcher-latency=1 &> ~/middleman.log &
3845
SHELL
3946
end

0 commit comments

Comments
 (0)