Skip to content

from Ruby on Rails Tutorial (Rails 5) Chapter 3

Notifications You must be signed in to change notification settings

HiromuIshikawa/eye-dear

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby on Rails Tutorial sample application

This is the sample application for Ruby on Rails Tutorial: Learn Web Development with Rails by Michael Hartl.

License

All source code in the Ruby on Rails Tutorial is available jointly under the MIT License and the Beerware License. See LICENSE.md for details.

Setting for Dropbox

This application use Dropbox API to storing pictures with production. You should follow next settings. I referenced this.

  1. Register Dropbox.

  2. Get API token from Dropbox setting.

    1. Access "Create App".

    2. Choose Dropbox API in "Choose an API".

    3. Choose App folder in "Choose the type of access you need".

    4. Input your app name in "Choose the type of access you need".

    5. Memorize "App key" and "App secret".

  3. Authorize to access to Dropbox.

    1. Install gems with bundler(if yet).
    $ bundle install --without production
    
    1. Run this command.
    $ rake dropbox:authorize APP_KEY=<your_app_key> APP_SECRET=<your_app_secret> ACCESS_TYPE=dropbox
    
    1. Access showed URL and authorize.

    2. Return to console and input "y"

    3. Memorize showed access_token, access_token_secret, and user_id.

  4. Set tokens in Dropbox to heroku env

$ heroku config:set APP_KEY=<your_app_key>
$ heroku config:set APP_SECRET=<your_app_secret>
$ heroku config:set ACCESS_TOKEN=<your_access_token>
$ heroku config:set ACCESS_TOKEN_SECRET=<your_access_token_secret>
$ heroku config:set USER_ID=<your_user_id>

Getting started

To get started with the app, clone the repo and then install the needed gems:

$ bundle install --without production

Next, migrate the database:

$ rails db:migrate

Finally, run the test suite to verify that everything is working correctly:

$ rails test

If the test suite passes, you'll be ready to run the app in a local server:

$ rails server

For more information, see the Ruby on Rails Tutorial book.

About

from Ruby on Rails Tutorial (Rails 5) Chapter 3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 66.6%
  • HTML 23.5%
  • CSS 7.4%
  • CoffeeScript 1.5%
  • JavaScript 1.0%