When you work on a Rails project you want your .git repo to be in the root of your Rails App.
This is very important for hosting your app on Heroku.
Many of you have the following repo structure:
# A project folder, with a rails app inside of it.| git reset HEAD~2 // however many commits you want to squash into one | |
| git add . | |
| git commit -m 'bigfoot is real' | |
| git push origin feature/bigfoot --force |
| ________________________________________________________________________ | |
| **** GIT HUB WITH GROUP PROJECTS **** | |
| ________________________________________________________________________ | |
| * git branch -d → Will delete the branch completely if it SUCKS. | |
| * AlWAYS pull first before you start your work. | |
| * git checkout develop → Never work on master branch. | |
| - Your MASTER branch must always work. | |
| ________________________________________________________________________ | |
| ** Beginning of Day: ** |
| group :development, :test do | |
| gem 'launchy' | |
| gem 'capybara' | |
| gem 'pry-rails' | |
| gem 'rails-erd' | |
| gem 'rspec-rails', '~> 3.0.0.beta' | |
| gem 'jasmine' | |
| gem 'shoulda-matchers' | |
| gem 'factory_girl_rails' | |
| gem 'rubocop' |
| # What about including `pry`, `rspec` or `guard`? | |
| # They're loaded automatically as dependencies | |
| group :development, :test do | |
| # Annotates ActiveRecord Models, routes and others based on the database schema | |
| gem "annotate" | |
| # generates entity relationship diagrams based on Active Record models | |
| # Postscript bugs may be fixed with: |
| ---------------------------------------------------------------------- | |
| #### Steps to create Rails App #### | |
| ---------------------------------------------------------------------- | |
| 1.) rails new app_name -d postgresql | |
| 'Jesse's way': rails g model Complaint descriptor:string address:string latitude:decimal longitude:decimal zip:integer | |
| 2.) database.yml → 'Phil's gist' | |
| - put in: echo $USER in the terminal right after to make sure it works. | |
| 3.) rake db:create | |
| 4.) Insert ‘gem’ gist for development: |
| group :development, :test do | |
| gem 'pry-rails' | |
| gem 'rspec' | |
| gem 'rspec-rails' | |
| gem 'guard' | |
| gem 'guard-rspec' | |
| gem 'guard-bundler', require: false | |
| gem 'terminal-notifier-guard' | |
| gem 'shoulda-matchers' | |
| end |