A website for (fictional) world travel information created using Ruby on Rails. In particular, this website informed about the countries in the world from traveler. Each traveler gives rating by their experience and written comments. You can visit the random country site within this website. In order to use this website, you need two git repos (world_travel_backend and world_travel_interface). The backend logic was tested with the integration test spec for API call.
The site should have functionality to review countries but your database should have built-in list of countries (check deployment instructions). All reviews should have an author, comments and rating. (A rating can be a number between 1 and 10.) You can include other fields of your choosing as well.
This site should use scopes to display the following information on the site: The country with the most reviews. The country with highest averaged ratings from travelers. A suggestion of country to visit by random selection
This project should include seed data for 195 countries with 5 to 25 250 reviews. Use Faker with a loop to seed the database.
- Deployment instructions For API service back-end, execute rails server with port number 3001 in same machine with interface. rails s -p 3001 For interface, execute rails server with port number 3000 in same machine with interface. rails s
- Open terminal and type 'git clone https://github.com/quantum93/world_travel_interface.git'
- Open terminal and type 'git clone https://github.com/quantum93/world_travel_backend.git'
- Navigate to each project directory using cd in terminal
- Open project in text editor (atom .)
- _Type 'bundle install' in terminal to load Gems
- rake db:create
- rake db:migrate
- For API service back-end, execute rails server with port number 3001 in same machine with interface.
- rails s -p 3001
- For interface, execute rails server with port number 3000 in same machine with interface.
- rails s
- copy countries(name) from '/Users/Guest/Desktop/world_travel_api/countries.csv' DELIMITER ',';
- rake db:seed
- rails server -p 3001 (For API server back-end,)
- rails server 3000 (For userinterface side,)
- open http://localhost:3000 in a web browser
- To run tests, type 'rspec' in terminal
- postgres DB installation with sql script in project (if your Postgres DB is not starting at login, please execute "pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start" on terminal.
- for database backup, please execute followings in terminal,
- pg_dump [YOUR DATABASE NAME] > database_backup.sql
- for database restore after clone, please execute followings in terminal
- createdb [DATABASE NAME]
- psql [DATABASE_NAME] < database_backup.sql
- createdb -T [DATABASE NAME] [TEST DATABASE NAME]
Please contact us if you have any issues at: taebumlee@gmail.com
- Ruby 2.5.1
- ActiveRecord
- Bootstrap
- Rspec
- Faker
- FactoryBot
- Atom
- GitHub
- Postgres DB 11.1
- for faker practice, use the faker information on https://www.rubydoc.info/gems/faker/1.6.6#fakervehicle site for test.
This software is licensed under MIT license.
Copyright (c) 2019 _Tae Lee and Alex Siegberg