Skip to content

A Twitter clone app built "almost from scratch" with Ruby on Rails.

License

Notifications You must be signed in to change notification settings

lethang7794/rails_sample_app

Repository files navigation

Ruby on Rails Tutorial sample application

This is the sample application for Ruby on Rails Tutorial: Learn Web Development with Rails (6th Edition) by Michael Hartl.

Basically, this is a Twitter clone app built "from scratch" with Ruby on Rails.

Demo app can be access here.

Prerequisite

  • Ruby 2.7.1
  • NodeJS
  • Yarn

Getting started

To get started with the app, clone the repo and 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

Note:

If you can't start the server, and the error is

Your Yarn packages are out of date!
Please run `yarn install --check-files` to update.

Just run

yarn install --check-files

or

yarn --update-checksums

and start the local server again.

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.