[openstreetmap-website] Vagrant provisioning fails with "sudo: rake: command not found" (#1193)

mmd notifications at github.com
Sat Mar 26 15:30:05 UTC 2016

I did the following changes to the provision.sh script, and the server seems to start up at least now. Unfortunately, I have no idea, if this is the right way to do it, ymmv.

diff --git a/script/vagrant/setup/provision.sh b/script/vagrant/setup/provision.sh
index 5699b53..769f0e8 100644
--- a/script/vagrant/setup/provision.sh
+++ b/script/vagrant/setup/provision.sh
@@ -17,11 +17,13 @@ apt-get install -y ruby2.0 libruby2.0 ruby2.0-dev \
                      libmagickwand-dev libxml2-dev libxslt1-dev nodejs \
                      apache2 apache2-threaded-dev build-essential git-core \
                      postgresql postgresql-contrib libpq-dev postgresql-server-dev-all \
-                     libsasl2-dev imagemagick
+                     libsasl2-dev imagemagick rbenv
 gem2.0 install bundler
 ## install the bundle necessary for openstreetmap-website
 pushd /srv/openstreetmap-website
+rbenv rehash
 # do bundle install as a convenience
 sudo -u vagrant -H bundle install
 # create user and database for openstreetmap-website
@@ -49,5 +51,5 @@ if [ ! -f config/application.yml ]; then
                sudo -u vagrant cp config/example.application.yml config/application.yml
 # migrate the database to the latest version
-sudo -u vagrant rake db:migrate
+sudo -u vagrant bundle exec rake db:migrate


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20160326/27a13732/attachment.html>

More information about the rails-dev mailing list