Ruby JavaScript
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
config
db
doc
lib/tasks
log
public
script
test
vendor/plugins
.gitignore
.gitmodules
LICENSE
README.rdoc
Rakefile

README.rdoc

Wedding

A wedding site with news articles, events calendar with rsvp, paypal integrated donation meter, wedding party members, wedding stories, and static pages.

Install

Clone the git repository.

git clone git://github.com/randomutterings/wedding.git
cd wedding

Initialize and update the submodules.

git submodule init
git submodule update

Install RedCloth if your server doesn't have at least 4.2.3.

gem install RedCloth

Install Chronic if your server doesn't have at least 0.2.3.

gem install chronic

Install Haml if your server doesn't have at least 2.0.7

gem install haml

If you want to use the included rake task to backup your database to S3, install the aws-s3 library

gem install aws-s3

and edit config/s3_backup_config.yml with your s3 information

Move the config sample file.

mv config/config.sample.yml config/config.yml

Edit config/config.yml with your information.

You'll need to create a hosted Paypal button at www.paypal.com/us/cgi-bin/?&cmd=_button-designer. Under step 3, be sure to put the following under “Use Advanced Variables” notify_url=www.your-domain-name.com/gift_registry. Also put www.your-domain-name.com/gift_registry under take customers to this url when they finish and take customers to this url when they cancel. If you want to edit your button later, go to www.paypal.com under My Account, Profile, More options, then click on My Saved Buttons under Selling Preferences.

Move the database sample file.

mv config/database.sample.yml config/database.yml

Edit it for your environment and migrate the database.

rake db:create
rake db:migrate RAILS_ENV=production

Usage

Once you have the site setup, go to your-domain.com/login and enter the password from your config/config.yml. Also, you'll want to edit public/images/names.png with a graphics editor and change the names.

Database backup to Amazon S3

To backup your database to Amazon S3, run the following from project root or set it up as a cron job to run automatically.

rake db:backup RAILS_ENV=production

Optionally put this in a crontab to run the backup automatically.

# Full backup every dat at 11:01
1 23 * * *  cd /path/to/your/project && /var/lib/gems/1.8/bin/rake db:backup RAILS_ENV=production

To restore the production database run

rake db:restore RAILS_ENV=production

Asset backup to Amazon S3

To backup everything in the public folder to Amazon S3, run the following from project root or set it up as a cron job to run automatically. Each backup is compressed into a single archive and compressed before uploading.

rake assets:backup

Optionally put this in a crontab to run the backup automatically.

# Full backup every Wednesday at 11:30
30 23 * * 3  cd /path/to/your/project && /var/lib/gems/1.8/bin/rake assets:backup

To restore the public directory run

rake assets:restore

Troubleshooting and FAQs

I get a missing database error.

Make sure your database.yml is configured for your environment and run

rake db:migrate RAILS_ENV=production.

I get “cannot create ./tmp/production_dump-YYYY-MM-DD_HH-MM-SS.sql.gz: Directory nonexistent” when running the database backup to S3

You need to create a tmp directory in the root.

mkdir tmp

Another problem?

Make sure you're using Rails 2.3.5.

Found a bug?

If you are having a problem with the site, first look at the FAQs above. If you still cannot resolve it, please submit an issue here.

github.com/randomutterings/wedding/issues

Rails 3

This site does not yet officially work with Rails 3.