City Bird
Description:
- Make meaningful connections. Be an ambassador to your city. Make new memories with a new friend._ Deployed Test Site:
- City Bird
Table of Contents
Initial White-Boarding
Schema
Project Setup
How do I, as a developer, start working on the project?
- Start by cloning the project!
$git clone https://github.com/stevenspiel/city_bird
- *** The $ symbol at the start of the line denotes the command/terminal line.
- What dependencies does it have (where are they expressed) and how do I install them?
- They are all listed in the Gemfile, but...
- Production - Gon, Geocoder, Dotenv-rails, Rest-client, Postgres
- Development/Test - Shoulda-Matchers, FactoryGirl, Faker, Capybara
- Those are the gems required, besides what Rails 4 comes with.
- The project uses the Mailgun and Facebook API, so you will need to obtain your own keys and place them in a .env.local file in your root directory:
- MAILGUN_API_KEY
- FACEBOOK_APP_ID
- FACEBOOK_SECRET
- DOMAIN (your domain for the site. For local development it would be localhost of course.) -Additionally, if using your own email, replace the citybird email with your own in the emails controller, meetups controller, and emails model.
- How can I see the project working before I change anything?
- The usual way...
- Clone the repo.
$bundle, $rake db:create db:migrate, $rake db:seed (optional), $rails s
- Open a browser and type
localhost:3000
in the URL.
Testing
How do I run the project's automated tests?
Below is the command to run all model/controller/integration tests using RSpec
$rake spec
Deploying
How to setup the deployment environment
- Make sure to set your envioronment variables on the server (the variables identified in the .env.local file described previously)
- The app also makes use of rake tasks to send email notifications. On Heroku, at least, you can use Heroku Scheduler.
- The javascript tree is not being required in application.js. Any new, unique javascript files will need to be referenced for config/environments/production.rb
Troubleshooting & Useful Tools
Weird Stuff
- You may have to...
- remove the
<%=ENV['FACEBOOK_APP_ID']%>
line from /app/assets/javascripts/facebook. - Save the file
$rails s
- stop the rails server
- replace the
<%=ENV['FACEBOOK_APP_ID']%>
line in /app/assets/javascripts/facebook. $rails s
- Then you're good to go!!!