This is an interactive Ruby on Rails 5 exercise aimed introducing the basics of web development, used in the course SWTII. It is based partly on the offical "Getting Started with Rails" guide, so in case of getting stuck, that might be a good start to find solutions. The interactivity of this exercise is provided by opening issues in the GitHub issue tracker (through automation in a CI server). The tickets contain the currently failing test case and the corresponding error message as well as instructions on what tasks to tackle next.
This repository contains an application stub of an academic paper management system with a failing test case.
Follow these steps to complete the software and the exercise:
Log-in / Sign-up with travis-ci.com and enable automatic builds for your exercise repository
YOUR_GH_USER_HERE
with your GitHub user name)Ensure that the issue tracker of the GitHub repository is active. This can be done in the repository's "Settings" tab on the GitHub website.
git clone
. You might want to clone using SSH instead of HTTPS, to avoid having to type credentials when pushing.ruby --version
. It should be 2.5.1
. Other Ruby versions might work, but this is the one that was tested.rbenv install 2.5.1
(this might take a few minutes, as Ruby is being compiled).ruby_version
file in the repository instructs the ruby version manager to use the correct version.vagrant ssh #connect with VM
cd <app_folder>
rails s -b 0 #starting rails server, the -b part is necessary since the app is running in a VM and would otherwise drop the requests coming from the host OS
bundle install
to install the dependencies of the project (they are stored in the Gemfile
)
bundle
command was not found, install bundler with gem install bundler
rails db:migrate RAILS_ENV=development && rails db:migrate RAILS_ENV=test
to migrate the databaserails s
) and check that the application runs (default: http://localhost:3000/
)rspec
to run the tests (RSpec is a test framework for Ruby)Failing test for #<ISSUE NUMBER>
.Tips:
rails s
) and try out your app in the browserrails routes
rspec spec/<path_to_spec>.rb
to only run one set of specs/spec/factories
to get inspiration for your data modelrails db:drop && rails db:migrate
deletes the database and recreates it. This might be helpful for error recovery.git status
) and pushed to the upstream repository (i.e., the one on GitHub) before the deadline