This is the repo for the newly updated Girl Develop It website. In this README you'll find helpful resources to get you up and running to start contributing to the code base!
Girl Develop It is a nonprofit organization that exists to provide affordable and accessible programs for women interested in learning web and software development. Through mentorship and hands-on instruction Girl Develop It can help them reach their goals.
Great! We're thrilled that you are interested in helping out with the website and contributing your talents to our code base. In this section, you'll learn more about how to go about actually contributing and how to get your local development environment setup.
If you are unfamiliar with forking, branching or working with git/Github, here are a few things you'll need to do:
- Create a Github account, or sign in to you existing account.
- Go through the following git/Github tutorial: https://try.github.io/
- Read about Github flow and the process for submitting code: https://guides.github.com/introduction/flow/index.html
- homebrew, a package manager for Mac OS X.
- rvm, a command-line tool to manage different versions of Ruby.
- ruby 2.1.2
- PostgreSQL 9.3.+
- Install with homebrew using
brew install postgres
and follow the brew instructions for these withbrew update
andbrew doctor
. - OR
- Using Postgres.app for Mac OS X (recommended).
- Install with homebrew using
Note: If you are upgrading from 9.2., please see instructions below for "Upgrading PostgreSQL from 9.2."
- Fork this repo into your personal Github account.
- Clone your copy to your desktop.
- Next, install all required gems:
bundle install
- Next, start postgres with command-line interface OR with PostgreSQL Mac OS X GUI. Make sure it is running before proceeding to next steps.
Finally, set up the database:
rake db:create db:migrate db:seed
If you are setting up a local development environment, ignore rake migration errors for now. Optionally instead of the rake
command, you can simply run
createdb
- Meetup API key is set as an environment variable. To register a new API key.
To run locally:
$ export MEETUP_API_KEY=[new key]
Check with
$ echo $MEETUP_API_KEY
- Add another remote:
git remote add upstream git@github.com:girldevelopit/gdi-new-site.git
- Now test your local dev environment by running
rails s
and visiting http://0.0.0.0:3000. You should now see a local copy of the live website! \o/
- Make a local branch for your feature (e.g.
git branch update-homepage
). - Switch to that new branch (e.g.
git checkout update-homepage
) - Make your changes on your branch.
- Test it out locally by running
rails s
and visiting http://0.0.0.0:3000 in your favorite browser. - Run
git fetch upstream
and thengit rebase upstream/master
in your branch. - Test again, see step 6.
- Push your branch to your repo (e.g.
git push origin update-homepage
) - Make a pull request against the main repos master branch!
We generally check all pull requests every 24-48 hours, but feel free to ping us on Twitter if there is an urgent need.
If you are an owner and/or have been approved by one of the Project Leads, than this section is relevant to you!
- Be sure that have the Heroku tool belt installed.
- Add a remote to the GDI Heroku instance with
heroku git:remote -a girl-develop-it
. - Now deploy to Heroku with
git push heroku master
.
NOTE: This process will be updated as we start incorporating continuous integration processes, as well as after the site goes officially live.
Here are a few things you can do to help if you run into any trouble with the installation process. If you need assistance, join the #website channel in our official Girl Develop It Slack.
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
Generally, this error means that you do not have a postgres process started on your machine. Try doing the following steps:
- Make sure
~/Library/LaunchAgents
does not include*.plist
. - Restart your computer.
- Make sure that there is a postgres process running on your machine.
- Add this to your ~/.bash_profile:
export PGHOST=localhost
. - Restart terminal or run
source ~/.bash_profile
. - Try
rake
orcreatedb
commands again.
After that, you can run rails server
to start the server on port 3000
or rails console
for a REPL.
- Uninstall PostgreSQL.
sh rm rf /usr/local/var/postgres/
(or wherever you have your postgres/ directory).- Install PostgreSQL 9.3.