everydayrails/everydayrails-rspec-2017

How to try the sample application in your browser

ruralocity opened this issue · 0 comments

I received a request for more information about setting up the sample application in a local development environment. I recommend trying the application to get a better understanding of what's being tested throughout the book. See chapter 1 of the book for a list of the application's features. If you find this confusing/overwhelming, you may want to check out resources geared toward learning Rails itself, before digging into testing.

I tried to keep the sample application as simple as possible, to minimize extra dependencies, but you will need to install the following in order for the application to work:

  • a currently supported Ruby (2.3.x, 2.4.x, or 2.5.x as of this writing)
  • The bundler gem (gem install bundler if necessary)
  • sqlite3 database (you can opt to use a different database; adjust the settings in config/database.yml accordingly. For study purposes, sqlite is more than enough, though.)

Next, install the gem dependencies, if you haven't already, using your command line:

cd everydayrails-rspec-2017 
bundle install

Then, create databases for each environment and run migrations:

bin/rails db:create:all
bin/rails db:migrate

Finally, start the sample app:

bin/rails s

Click the Sign Up link to create an account for yourself in the sample application and create projects and tasks.

Future versions of the sample application and book will include a setup script to simplify this process.