Guest User

Untitled

a guest
Apr 20th, 2014
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1. To get set up:
  2.  
  3. Fork the repo to your account
  4.  
  5. Clone your repo to your local machine, and set brandfolder/boulder as the upstream
  6.  
  7. $ git clone [email protected]:<YOUR GITHUB USERNAME>/boulder.git
  8. $ cd boulder
  9. $ git remote add upstream https://github.com/brandfolder/boulder.git
  10. $ bundle
  11. Install Homebrew
  12.  
  13. ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
  14. Install Postgres
  15.  
  16. $ brew install postgres
  17. $ initdb /usr/local/var/postgres -E utf-8
  18. $ ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
  19. $ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
  20. If you run $ which psql and it responds /usr/bin/psql you will need to edit your .bashrc:
  21.  
  22. $ sudo open ~/.bashrc
  23. Install Apple Developer Tools if .bashrc does not exist.
  24.  
  25. Add these lines to the top of your .bashrc:
  26.  
  27. PATH=/usr/local/bin:$PATH
  28. export PGHOST=localhost
  29. 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:
  30.  
  31. Install Apple Developer Tools if initdb is not a recognized function.
  32.  
  33. If you are seeing this error:
  34.  
  35. could not connect to server: No such file or directory
  36. Is the server running locally and accepting
  37. connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
  38. This may resolve it:
  39.  
  40. mkdir /var/pgsql_socket/
  41. ln -s /private/tmp/.s.PGSQL.5432 /var/pgsql_socket/
  42. Set up Postgres for development and testing on boulder. You MUST have Postgres 9.2 or greater.
  43.  
  44. Create a user role for boulder
  45.  
  46. $ psql -d postgres
  47. postgres=# CREATE ROLE boulder LOGIN CREATEDB;
  48. postgres=# \q
  49. Now create the boulder development and test databases using rake
  50.  
  51. $ bundle exec rake db:create
  52. $ bundle exec rake db:structure:load
  53. $ bundle exec rake db:migrate
  54. $ bundle exec rake db:test:prepare
  55. Install redis
  56.  
  57. $ brew install redis
  58. Install PhantomJS
  59.  
  60. $ brew install phantomjs
  61. Run the tests
  62.  
  63. Add the test Stripe keys to config/local_env.yml
  64.  
  65. STRIPE_KEY: sk_test_bhD7fINUO50nfQ6IQSIIdn8t
  66. STRIPE_PUBLISHABLE_KEY: pk_test_ODt8ei8ocWpBu6IVrZxQKD3N
  67. To run the test suite, run
  68.  
  69. $ bundle exec rake db:migrate
  70. $ bundle exec rake db:test:prepare
  71. $ rspec
  72. Everything should pass on master. If not, let me know.
  73.  
  74. When developing, open a new shell and run
  75.  
  76. $ bundle exec guard
  77. 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.
  78.  
  79. Load Google Fonts for "Add Fonts" to work
  80.  
  81. Start console:
  82.  
  83. $ rails c
  84. Then run:
  85.  
  86. Google::Fonts.cache!
  87. Start the server with foreman
  88.  
  89. Foreman is a gem that starts up all the dependencies you need for development.
  90.  
  91. First:
  92.  
  93. $ gem install foreman
  94. then to start the server and all the dependencies, do
  95.  
  96. foreman start
Advertisement
Add Comment
Please, Sign In to add comment