Coder Social home page Coder Social logo

rails_sample_app's Introduction

Ruby on Rails Tutorial sample application

Reference implementation

This is the reference implementation of the sample application from Ruby on Rails Tutorial: Learn Web Development with Rails (6th Edition) 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.

Getting started

To get started with the app, first clone the repo and cd into the directory:

$ git clone https://github.com/mhartl/sample_app_6th_ed.git 
$ cd sample_app_6th_ed

Then install the needed gems (while skipping any gems needed only in production):

$ 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

Branches

The reference app repository includes a separate branch for each chapter in the tutorial (Chapters 3–14). To examine the code as it appears at the end of a particular chapter, simply check out the corresponding branch using git checkout:

$ git checkout <branch name>

A full list of branch names appears as follows:

static-pages
rails-flavored-ruby
filling-in-layout
modeling-users
sign-up
basic-login
advanced-login
updating-users
account-activation
password-reset
user-microposts
following-users

Starting in Chapter 10 (“Updating users”), the sample app comes configured to seed the database with sample users, which you can activate by resetting the database and then running the seed program:

$ rails db:migrate:reset
$ rails db:seed

Help with the Rails Tutoiral

Experience shows that comparing code with the reference app is often helpful for debugging errors and tracking down discrepancies. For additional assistance with any issues in the tutorial, please consult the Rails Tutorial Help page.

Suspected errors, typos, and bugs can be emailed to [email protected]. All such reports are gratefully received, but please double-check with the online version of the tutorial and this reference app before submitting.

rails_sample_app's People

Contributors

mallen47 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.