u8this.com food diary
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
db
lib
log
public
spec
vendor/assets
.gitignore
Capfile
Gemfile
Gemfile.lock
LICENSE.md
README.rdoc
Rakefile
config.ru

README.rdoc

README

Using:

  • Apache

  • Phusion Passenger

  • rvm

  • ruby 2.0.0

  • capistrano

  • rspec

  • Bootstrap 3

  • AuthLogic

Asserts, and data integrity:

I'm using solid_assert.gem. Only use that to check if things have done what they were supposed to, don't try to fix anything inside of asserts, just assert that it isn't right.

To try to repair anything wacky in the database, use `cap production db_fixup`.

Environments:

  • Development: Run this on your own box. sqlite.

  • Staging: Meant to be run in same setup as production, so you can test deployment. Postgres.

  • Production: Postgres.

Database Setup:

Using postgresql for staging and production.

NOTE: Before doing bundle install, do:

gem install pg – –with-pg-config=/Library/PostgreSQL/9.1/bin/pg_config

-Create the “Role” (aka user):

# createuser -d -R -P will create a user that can create a db (-d), can't create role (-R), and prompt for password(-P)

sudo -u postgres createuser -d -R -P USERNAME

-Enter and confirm a password for the new user

-Put the password in a file in “deploy” user's home directory, as named in database.yml. (E.g. '.u8this'.)

`chown deploy:deploy` that file, and `chmod 600` it.

-Create the db:

# createdb -O will create a db with the specified owner (-O)

sudo -u postgres createdb -O USERNAME DBNAME