This project consists of building a site intended for smartphones, that consist of grouping the nutriments consumed by a given user while calculating the total calories consumed.
- Ruby v2.7.0
- Ruby on Rails v6.0.2.2
The development environment uses Ruby
, hence install ruby before proceeding.
-
Mac OS -
brew install ruby
-
Linux -
sudo apt-get install ruby-full
-
windows - Download RubyInstaller here, run it, and you are done!
(If you have Bundler installed "To Check if Bundler is installed, run this command **_bundle -v**, if you get **Bundler version 2.x.x**", please skip to the next step!)_
To install Bundler run this command:
gem install bundler
Now, you are ready to install the Gemfile dependencies. Run the following command and you are good to go:
bundle install
-
Clone the project - git clone
https://github.com/simoxsimo/regime.git
-
Run
bundle
to get all the gems. -
Go to config/database.yml change password to your postgres DB password, or follow this guide
-
Run
sudo service posgresql start
-
Run
rails db:migrate
Inside The project Repository run the following command:
$ rails server
Then, go to http://localhost:3000/
-
Run
rails db:seed
to populating a database with the initial data needed for a Rails project. -
Login using
admin
orseed{n}
where (0 < n < 11). for example: for n = 1 our seed will beseed1
Inside The project Repository run the following command:
$ rspec
👤 Mohammed TOUILI
- Github: @simoxsimo