diff options
| author | Seb Bacon <seb.bacon@gmail.com> | 2012-04-06 06:04:06 -0700 |
|---|---|---|
| committer | Seb Bacon <seb.bacon@gmail.com> | 2012-04-06 06:04:06 -0700 |
| commit | 9b5837c399e0525fac34470cf824c4efafd1ff58 (patch) | |
| tree | ca935590117ef467c8363cfd82e48235ab9f02e9 | |
| parent | ab04d57f99c46a89c39bbd1b026da7094332fb63 (diff) | |
| parent | 9559da4239052c6d685eb58abc0939881cd5b699 (diff) | |
Merge pull request #466 from henare/bundle-exec-docs
Update docs to run commands under bundle exec
| -rw-r--r-- | chef/cookbooks/alaveteli/recipes/default.rb | 21 | ||||
| -rw-r--r-- | doc/INSTALL-vagrant.md | 6 | ||||
| -rw-r--r-- | doc/INSTALL.md | 10 |
3 files changed, 20 insertions, 17 deletions
diff --git a/chef/cookbooks/alaveteli/recipes/default.rb b/chef/cookbooks/alaveteli/recipes/default.rb index f12c0c297..a17ec7edd 100644 --- a/chef/cookbooks/alaveteli/recipes/default.rb +++ b/chef/cookbooks/alaveteli/recipes/default.rb @@ -60,8 +60,10 @@ bash "bring bundle into the PATH" do end bash "run bundle install" do - cwd node[:root] - code "bundle install" + user node[:user] + cwd node[:root] + environment ({'HOME' => '/home/vagrant'}) + code "bundle exec bundle install" end bash "bring rake into the PATH" do @@ -70,9 +72,10 @@ bash "bring rake into the PATH" do end bash "create databases" do - cwd node[:root] - user node[:user] - code "rake db:create:all" + user node[:user] + cwd node[:root] + environment ({'HOME' => '/home/vagrant'}) + code "bundle exec rake db:create:all" end bash "checkout submodules" do @@ -81,9 +84,9 @@ bash "checkout submodules" do code "git submodule update --init" end - bash "run the post-install script" do - cwd node[:root] - user node[:user] - code "./script/rails-post-deploy" + cwd node[:root] + user node[:user] + environment ({'HOME' => '/home/vagrant'}) + code "bundle exec ./script/rails-post-deploy" end diff --git a/doc/INSTALL-vagrant.md b/doc/INSTALL-vagrant.md index 35561f4a7..18db33c95 100644 --- a/doc/INSTALL-vagrant.md +++ b/doc/INSTALL-vagrant.md @@ -40,15 +40,15 @@ shared folders. ### Load sample data and index it - ./script/load-sample-data && ./script/rebuild-xapian-index + bundle exec ./script/load-sample-data && bundle exec ./script/rebuild-xapian-index ### Run the tests - rake + bundle exec rake ### Start the development server - ./script/server + bundle exec ./script/server ### And you're golden diff --git a/doc/INSTALL.md b/doc/INSTALL.md index a02efee33..35d64fc68 100644 --- a/doc/INSTALL.md +++ b/doc/INSTALL.md @@ -229,7 +229,7 @@ probably don't want this in your development profile; the example In the 'alaveteli' directory, run: - ./script/rails-post-deploy + bundle exec ./script/rails-post-deploy (This will need execute privs so `chmod 755` if necessary.) This sets up directory structures, creates logs, installs/updates themes, runs @@ -255,11 +255,11 @@ If you want some dummy data to play with, you can try loading the fixtures that the test suite uses into your development database. You can do this with: - ./script/load-sample-data + bundle exec ./script/load-sample-data Next we need to create the index for the search engine (Xapian): - ./script/rebuild-xapian-index + bundle exec ./script/rebuild-xapian-index If this fails, the site should still mostly run, but it's a core component so you should really try to get this working. @@ -268,7 +268,7 @@ component so you should really try to get this working. Make sure everything looks OK: - rake spec + bundle exec rake spec If there are failures here, something has gone wrong with the preceding steps (see the next section for a common problem and @@ -280,7 +280,7 @@ gone wrong. Run the following to get the server running: - ./script/server --environment=development + bundle exec ./script/server --environment=development By default the server listens on all interfaces. You can restrict it to the localhost interface by adding ` --binding=127.0.0.1` |
