Development:Setup:OSX: Difference between revisions
Jump to navigation
Jump to search
Line 57: | Line 57: | ||
==Build the Expertiza Database== | ==Build the Expertiza Database== | ||
Notice: You may need to prepend the following commands with | Notice: You may need to prepend the following commands with <code>bundle exec</code>. | ||
<pre style="white-space:normal;">rake db:migrate</pre> | <pre style="white-space:normal;">rake db:migrate</pre> | ||
<pre style="white-space:normal;">rake db:test:prepare</pre> | <pre style="white-space:normal;">rake db:test:prepare</pre> |
Revision as of 15:04, 21 April 2013
Prerequisites
- You must have shell access
- You must have root access (via sudo), or the required software must already be installed
Install Git
Get Expertiza
Expertiza Repository URLs
- (ssh, read/write) git@github.com:expertiza/expertiza.git
- (https, read/write) https://github.com/expertiza/expertiza.git
- (git, read-only) git://github.com/expertiza/expertiza.git
Default
git clone <remote>
git clone git@github.com:expertiza/expertiza.git
Options
git clone -b <branch> <remote>
git clone -b production git@github.com:expertiza/expertiza.git
Install Homebrew
http://mxcl.github.io/homebrew
Install RBENV
$ brew update $ brew install rbenv $ brew install ruby-build
Install Ruby v. 1.8.7
https://github.com/sstephenson/ruby-build/wiki#installing-187-on-os-x-108-mountain-lion
Install Native Expertiza Dependencies
Dependencies are for the gems raspell, rjb, nokogiri, and mysql.
brew install aspell gcc47 libxml2 libxslt graphviz
Install Bundled Gems
Set JAVA_HOME for the rjb gem:
export JAVA_HOME=/etc/alternatives/java_sdk
bundle install
Set Up the Database
Set the MySql Root Password
This step is not necessary, but it is advised to set a root mysql password.
mysqladmin -u root password
Log in to MySql
mysql -uroot -p
The following commands are executed inside mysql
Create the Expertiza User
create user expertiza@localhost;
Create the Databases
create database pg_development;
create database pg_test;
Grant Privileges to the Expertiza User
grant all on pg_development.* to expertiza@localhost;
grant all on pg_test.* to expertiza@localhost;
Build the Expertiza Database
Notice: You may need to prepend the following commands with bundle exec
.
rake db:migrate
rake db:test:prepare
Import Production Data (Optional)
This step requires that you have your ssh private/public key pairs loaded in the production server under the rails user.
How to Add SSH Keys to the Expertiza Production Server
You must run the following command from your local Expertiza project directory.
cap load_production_data