diff options
author | Martin Wright <martin@mynameismartin.com> | 2015-04-07 14:46:11 +0100 |
---|---|---|
committer | Martin Wright <martin@mynameismartin.com> | 2015-04-07 14:46:11 +0100 |
commit | 270606788ba97b9c509183a06cdefe3b83f07464 (patch) | |
tree | 3304ea68b1e5cfecc2518aa6effa643175e12fdd /docs/installing/macos.md | |
parent | 970396737e03ec2336f0ecc34d07047d83ff2629 (diff) | |
parent | 6cc59ede7bca866f7e56c771cc12ca1afa9406ef (diff) |
Merge branch 'gh-pages' of ssh://git.mysociety.org/data/git/public/alaveteli into gh-pages
Diffstat (limited to 'docs/installing/macos.md')
-rw-r--r-- | docs/installing/macos.md | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/docs/installing/macos.md b/docs/installing/macos.md index c46bdf4ba..2c08be0e5 100644 --- a/docs/installing/macos.md +++ b/docs/installing/macos.md @@ -71,7 +71,7 @@ Read `rvm notes` and `rvm requirements` carefully for further instructions. Then The `mahoro` and `pg` gems require special installation commands. Rubygems must be downgraded to 1.6.2 to avoid deprecation warnings when running tests. rvm 1.8.7 - gem update --system 1.6.2 + gem update --system 2.1.11 gem install mahoro -- --with-ldflags="-L/usr/local/Cellar/libmagic/5.09/lib" --with-cppflags="-I/usr/local/Cellar/libmagic/5.09/include" env ARCHFLAGS="-arch x86_64" gem install pg @@ -88,32 +88,36 @@ The following is mostly from [the manual installation process]({{ site.baseurl}} ### Configure database -Creates Alaveteli databases and an `foi` user with password `foi`. +Create a database for your Mac user as homebrew doesn't create one by default: - echo "CREATE DATABASE foi_development encoding = 'UTF8'; - CREATE DATABASE foi_test encoding = 'UTF8'; - CREATE USER foi WITH CREATEUSER; - ALTER USER foi WITH PASSWORD 'foi'; - ALTER USER foi WITH CREATEDB; - GRANT ALL PRIVILEGES ON DATABASE foi_development TO foi; - GRANT ALL PRIVILEGES ON DATABASE foi_test TO foi; - ALTER DATABASE foi_development OWNER TO foi; - ALTER DATABASE foi_test OWNER TO foi;" | psql -h localhost template1 + createdb -### Clone Alaveteli +Create a `foi` user from the command line, like this: + + createuser -s -P foi + +_Note:_ After running this command you will be prompted to set a +password for the user. Don't leave it blank if you are new to +PostgreSQL, or it could be difficult to set later for you. + +We'll create a template for our Alaveteli databases: + + createdb -T template0 -E UTF-8 template_utf8 + echo "update pg_database set datistemplate=true where datname='template_utf8';" | psql -We don't want to vendor Rails, as it causes problems locally. +Then create the databases: + + createdb -T template_utf8 -O foi alaveteli_production + createdb -T template_utf8 -O foi alaveteli_test + createdb -T template_utf8 -O foi alaveteli_development + +### Clone Alaveteli git clone https://github.com/mysociety/alaveteli.git cd alaveteli git submodule init - - sed -i~ 's/\\[submodule "vendor\/rails"\\]//' .git/config - - sed -i~ 's/url = git:\/\/github.com\/rails\/rails.git//' .git/config git submodule update -**Note:** Due to Markdown bugs, the first `sed` command above does not display properly if it appears in blockquote. ### Configure Alaveteli |