Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- To get set up:
- Fork the repo to your account
- Clone your repo to your local machine, and set brandfolder/boulder as the upstream
- $ git clone [email protected]:<YOUR GITHUB USERNAME>/boulder.git
- $ cd boulder
- $ git remote add upstream https://github.com/brandfolder/boulder.git
- $ bundle
- Install Homebrew
- ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
- Install Postgres
- $ brew install postgres
- $ initdb /usr/local/var/postgres -E utf-8
- $ ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
- $ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
- If you run $ which psql and it responds /usr/bin/psql you will need to edit your .bashrc:
- $ sudo open ~/.bashrc
- Install Apple Developer Tools if .bashrc does not exist.
- Add these lines to the top of your .bashrc:
- PATH=/usr/local/bin:$PATH
- export PGHOST=localhost
- Restart your shell, run $ which psql, and if it responds /usr/local/bin/psql, you are good to go! If not, try the remedies below:
- Install Apple Developer Tools if initdb is not a recognized function.
- If you are seeing this error:
- could not connect to server: No such file or directory
- Is the server running locally and accepting
- connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
- This may resolve it:
- mkdir /var/pgsql_socket/
- ln -s /private/tmp/.s.PGSQL.5432 /var/pgsql_socket/
- Set up Postgres for development and testing on boulder. You MUST have Postgres 9.2 or greater.
- Create a user role for boulder
- $ psql -d postgres
- postgres=# CREATE ROLE boulder LOGIN CREATEDB;
- postgres=# \q
- Now create the boulder development and test databases using rake
- $ bundle exec rake db:create
- $ bundle exec rake db:structure:load
- $ bundle exec rake db:migrate
- $ bundle exec rake db:test:prepare
- Install redis
- $ brew install redis
- Install PhantomJS
- $ brew install phantomjs
- Run the tests
- Add the test Stripe keys to config/local_env.yml
- STRIPE_KEY: sk_test_bhD7fINUO50nfQ6IQSIIdn8t
- STRIPE_PUBLISHABLE_KEY: pk_test_ODt8ei8ocWpBu6IVrZxQKD3N
- To run the test suite, run
- $ bundle exec rake db:migrate
- $ bundle exec rake db:test:prepare
- $ rspec
- Everything should pass on master. If not, let me know.
- When developing, open a new shell and run
- $ bundle exec guard
- Guard will immediately run unit tests when you save a file. Just let it run on the side while you code, and it will tell you when you fuck up.
- Load Google Fonts for "Add Fonts" to work
- Start console:
- $ rails c
- Then run:
- Google::Fonts.cache!
- Start the server with foreman
- Foreman is a gem that starts up all the dependencies you need for development.
- First:
- $ gem install foreman
- then to start the server and all the dependencies, do
- foreman start
Advertisement
Add Comment
Please, Sign In to add comment