Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Paperclip demo application

branch: master

Upgrade to Rails 4

* Update repository and bump all gem versions
* Update environment files
* Update controller to use strong params
* Update model to use new Paperclip validations
latest commit 735df12efd
Harlow Ward harlow authored djcp committed
Octocat-spinner-32 app Upgrade to Rails 4 February 17, 2014
Octocat-spinner-32 config Upgrade to Rails 4 February 17, 2014
Octocat-spinner-32 db Upgrade to Rails 4 February 17, 2014
Octocat-spinner-32 doc [#2] Rails project August 02, 2012
Octocat-spinner-32 lib [#2] Rails project August 02, 2012
Octocat-spinner-32 log [#2] Rails project August 02, 2012
Octocat-spinner-32 public [#15] Github fork link August 03, 2012
Octocat-spinner-32 script [#2] Rails project August 02, 2012
Octocat-spinner-32 spec Upgrade to Rails 4 February 17, 2014
Octocat-spinner-32 vendor [#15] Initial styling of the app August 02, 2012
Octocat-spinner-32 .gitignore [#15] Added footer and html5 shiv August 03, 2012
Octocat-spinner-32 .rspec [#3] RSpec test suite August 02, 2012
Octocat-spinner-32 Gemfile Upgrade to Rails 4 February 17, 2014
Octocat-spinner-32 Gemfile.lock Upgrade to Rails 4 February 17, 2014
Octocat-spinner-32 README.md [#16] Add screenshot of reference application August 03, 2012
Octocat-spinner-32 Rakefile [#2] Rails project August 02, 2012
Octocat-spinner-32 config.ru [#2] Rails project August 02, 2012
README.md

Paperclip Demo

Reference Application

Paperclip Demo Application

Application allows users to manage a list of “friends” using a basic Rails scaffold. Each friend will have a Name and Avatar. Paperclip will provide the image upload and resizing functionality. The app will demonstrate how to create different sized thumbnails, display resized images on different screens, and gracefully degrade to display missing avatars “missing.png” for friends without an avatar.

Install Codebase

Clone the git repository

$ git clone git@github.com:thoughtbot/paperclip_demo.git
$ cd paperclip_demo
$ bundle

Create database and run migrations

$ rake db:create db:migrate

Run the rails server

$ rails s

View Application

From a web browser access the site via localhost:3000

Deploy the application to Heroku

Create an application container on Heroku

$ heroku create

Push the code to the Heroku container

$ git push heroku master

Run any database migrations

$ heroku rake db:migrate

Set the AWS S3 config vars

$ heroku config:add AWS_BUCKET=your_bucket_name
$ heroku config:add AWS_ACCESS_KEY_ID=your_access_key_id
$ heroku config:add AWS_SECRET_ACCESS_KEY=your_secret_access_key

Now view your Heroku application

$ heroku open

Test suite

RSpec and Capybara used for Integration and Unit tests

$ rspec

Credits

thoughtbot

Paperclip Demo is maintained by thoughtbot, inc

The names and logos for thoughtbot are trademarks of thoughtbot, inc.

License

Trail Map is licensed under the Creative Commons Attribution License.

Something went wrong with that request. Please try again.