This API provides a backend for the Lenda Word Find test
This project uses RVM, although it is not required it helps to have a fresh start for the gems used in this project. If you are using RVM already, once you navigate into the project directory a new Gemset will be created and you would have to install Bundler into it.
You need to have installed:
- PostgreSQL and have SUPERUSER permissions on the Database. (Alternatively you can try using sqlite)
- Bundler (Run
gem install bundler
inside the Gemset) - Ruby v2.3.3 or higher
In your terminal, located inside the project directory execute:
$ bundle install
$ rails db:create db:migrate db:seed
$ rspec
If you want to run a specific test you can run it like this:
rspec spec/requests/v1/games_spec.rb:166
By default the server address is http://localhost:3000
$ rails s
This API comes with a separation of versions using URL namespacing. The current available version is Version 1. To access endpoints in this namespace use this host:
In case you are having trouble installing PostgreSQL or the pg
gem due to your system configuration, following this instructions to use Sqlite can help to run the API.
Be aware that when using sqlite if you open the project on a text editor it might crash due to the size of the db files created inside the directory after seeding the database. This option is recommended as an alternative to using a propert DB.
- Modify the Gemfile
- Change
gem 'pg'
bygem 'sqlite3'
- Run
$ bundle install
- Modify config/database.yml
- Change
adapter: postgresql
byadapter: sqlite3
- comment out
pool: 5