- Clone the repository down to local machine:
git clone https://github.com/CodeGovernor/CodeGovernor.git
- Change into the CodeGovernor directory
cd CodeGovernor
- Make sure that ruby and bundler are installed
$ ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
$ bundle -v
Bundler version 1.11.2
- Install all the gems needed to run application. This will read the Gemfile and get all the correct gems.
bundle install
- Make sure that postgresql is installed and running.
$ postgres -V
postgres (PostgreSQL) 9.5.1
$ ps -ef | grep [p]ostgres:
501 1320 1314 0 Thu11AM ?? 0:00.07 postgres: checkpointer process
501 1321 1314 0 Thu11AM ?? 0:01.17 postgres: writer process
501 1322 1314 0 Thu11AM ?? 0:01.16 postgres: wal writer process
501 1323 1314 0 Thu11AM ?? 0:02.39 postgres: autovacuum launcher process
501 1324 1314 0 Thu11AM ?? 0:07.13 postgres: stats collector process
If not installed read the following Guide
- Create the Database and Schema for running CodeGovernor.
$ rake db:setup
- Make sure that your GitHub Client ID and Client Secret Application Keys are present in the environment.
$ env | grep GH_
GH_CLIENT_SECRET=<your_application_client_secret>
GH_CLIENT_ID=<your_application_client_id>
If not present read the following about creating one - Registering your app.
Make sure that in the callback field to specify http://localhost:3000/auth/github/callback
- Start CodeGovernor
rails server -e development
- Open http://localhost:3000 in your WebBrowser and should be presented with the index page.
If during the bundle install of nokogiri fails due the following error (which you find in the mkmf.log)
ld: warning: ignoring file /usr/local/lib/libz.dylib, file was built for i386 which is not the architecture being linked (x86_64): /usr/local/lib/libz.dylib
The simplest way to work around it is as follows:
- Install zlib from homebrew
$ brew install zlib
Mark down the build variables provided for LDFLAGS
and CPPFLAGS
. They should be something like:
LDFLAGS: -L/usr/local/opt/zlib/lib
CPPFLAGS: -I/usr/local/opt/zlib/lib
- Install nokogiri by itself specifying the path to zlib.
$ brew install nokogiri -- --with-zlib-lib=/usr/local/opt/zlib/lib --with-zlib-include=/usr/local/opt/zlib/lib
- After nokogiri installs successfully redo bundle install. Should successfully complete.
$ bundle install