Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
This is the repo for the heroku deploy of jkerncoins
tree: c59b6e7538

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
backup
config
db
doc
lib
public
script
test
vendor
.gitignore
Gemfile
Gemfile.lock
README.rdoc
Rakefile
config.ru

README.rdoc

Notes

  • Never commit to upstream

Creating A New Site

Initialization

  1. Get the base GoldenCMS code:

git clone git@github.com:macattack2k/GoldenCMS.git

  1. Configure remotes:

git remote add upstream git@github.com:macattack2k/GoldenCMS.git

  1. Create the project:

git remote add origin git@github.com:<your-name>/<project-name>.git git add . git commit -a -m “Initial Commit” git push origin master

Installation

  1. Configure the user/password/database parameters to suit your project:

emacs config/database.yml

  1. Configure the bucket parameter to point to your project bucket:

emacs config/initializers/s3.rb

  1. Configure app specific information in th environment config file

emacs config/environment.rb

  1. Create the database:

rake db:create rake db:migrate

  1. That's it:

rails s

  1. Customize templates in app/views/layouts/

Deploying to Heroku

  1. Create a Heroku Application. This command will create a heroku app with default url: 'your-app-name.heroku.com':

heroku create <your-app-name>

  1. Configure the environment in heroku:

heroku config:add BUNDLE_WITHOUT=“development:test” heroku config:add S3_KEY=<your-s3-key> S3_SECRET=<your-s3-secret-key>

  1. Add addons:

heroku addons:add memcache:5mb heroku addons:add newrelic:standard heroku addons:add pgbackups:basic heroku addons:add releases:basic

  1. Create Database:

heroku rake db:migrate

  1. Open browser to deploy:

heroku open

Updating the GoldenCMS base code

TODO

  • Note that we dont want to update model changes… this could be tricky

Resources

Recommended Platform/Stack

  • Heroku Deploy

  • Framework: Rails 3.0.7

  • DB: Posgrsql

Updating Jquery and Rails.js

NOTE: NOT USED!!! 'rails generate jquery:install #--ui to enable jQuery UI --version to install specific version'

Git Help

Pro Git

Basic Rails

Rails Guides

GoldenCMS Info

Debugging

Throughout important code there are 'logger.debug _' calls which log useful information to the log file, but only at log level: debug. To run the application in debug log level, simply call 'rails s –debug' and all such information will be printed to the log.

Debug logging format: See Error Logging

Error Logging

How Heroku Deals with Errors

Format

  • '************* CACHE **************'

  • '************* DB **************'

  • '************* FILTER **************'

  • '************* PARAMS **************'

  • '************* CACHE **************'

  • '************* CODE **************'

Caching

TODO

Something went wrong with that request. Please try again.