These instructions will get you a copy of the bloodconnect project in rails on your local machine for development and testing purposes.
What things you need to install the software and how to install them
Ruby version for this project is 2.5.3
rbenv is our recommened and preferred ruby version management software. If you don't have rbenv installed on your system. You can see the installation instructions here.
For installing the ruby version, type in the following command on your terminal rbenv install 2.5.3
.
One can check the installed ruby version by the following command ruby -v
.
The output should be something like this ruby 2.5.3p105
.
Our preferred database managing software is Postgres. If not installed, one can look into their official documentation here and follow the steps as given.
Make sure you have git installed on your system, if you haven't, just refer this How to install Git.
For cloning the Github repository and goto the project follow the following commands
git clone git@github.com:rahuliitd98/bloodconnect-project.git
cd bloodconnect-project
Or one can fork it either.
To setup the project, follow the below commands in the project directory.
gem install bundler
bundle install
This will install all the required gems for the project on your system.
To setup psql db role one can go to the psql console by the following command and create role respectively.
sudo -u postgres psql
postgres=# CREATE ROLE blooodconnect with CREATEDB login password 'blooodconnect';
For setting up the migrations on your system, run the following commands on your system:
bundle exec rails db:create
bundle exec rails db:migrate
If a project has a seed file in it, one needs to run the following command as well:
bundle exec rails db:seed
bundle exec rspec spec/**/*.rb
The following command will fix all the rubocop offenses as per your .rubocop.yml file.
rubocop -a
If you just want to see the rubocop offenses, you normally type in rubocop
.
NOTE: One can configure .rubocop.yml file in the project.
$ bundle exec rails s
Your application should be running on localhost:3000