Skip to content

Latest commit

 

History

History
169 lines (119 loc) · 8.97 KB

README.md

File metadata and controls

169 lines (119 loc) · 8.97 KB

CircuitVerse

Financial Contributors on Open Collective Slack CircleCI Coverage Status

Join Mailing List

Versions

  • Ruby Version: ruby-2.6.5
  • Rails Version: Rails 6.0.1
  • PostgreSQL Version: 9.5

Cloning Instructions

  • git clone https://github.com/CircuitVerse/CircuitVerse.git this repository
  • cd CircuitVerse

Note : If you want to contribute, first fork the original repository and clone the forked repository into your local machine followed by cd into the directory

git clone https://github.com/<username>/CircuitVerse.git
cd CircuitVerse

Setup Instructions

Please go through the Contribution Guidelines before going forward with any development. This helps us keep the process streamlined and results in better PRs

Note: You might want to use the docker instructions if you do not want to setup your own environment.

  • Install ruby using RVM, use ruby-2.6.5
  • Install bundler : gem install bundler
  • Install Dependencies: bundle install
  • Configure your DB in config/database.yml, copy config/database.example.yml (Note : check for postgres password and update it in place of "postgres")
  • Create database: rails db:create
  • Run Migrations: rails db:migrate
  • At this point, local development can be started with rails s -b 127.0.0.1 -p 8080

Additional setup instructions

Yarn is a package manager for the JavaScript ecosystem. CircuitVerse uses Yarn for frontend package and asset management.

If you encounter the following error,

Error: File to import not found or unreadable: bootstrap/scss/bootstrap.scss

run yarn to install frontend dependencies

Additional software:

  • Install imagemagick
  • Start Redis server process.
  • To start sidekiq: bundle exec sidekiq -e development -q default -q mailers -d -L tmp/sidekiq.log (In development)

Running Tests

Ensure all tests are passing locally before making a pull request. To run tests -

  • bundle exec rspec or bin/rake spec:all

Note: To pass Systems Tests you need Chrome Browser installed

Docker Instructions

  • Install docker and docker-compose
  • Run: docker-compose up

If you need to rebuild, run this before docker-compose up

docker-compose down
docker-compose build --no-cache

Setup in cloud

You can use gitpod to develop CircuitVerse in the cloud by following the steps mentioned Here

Open in Gitpod

Pull Requests can be created by following these Steps

Adding Environment Variables

  • Make the following changes in your Google, Facebook, Github app:
  1. If you are running the application locally, update the site url field with http://localhost:8080 and callback url field with http://localhost:3000/users/auth/(google or facebook or github)/callback.
  2. If you are running the application in gitpod, update the site url field with gitpod url and callback url field with ```gitpod url/users/auth/(google or facebook or github)/callback``.
  • Configure your env in .env, copy .env.example ( Note: check for the id and secret in your Google, Facebook, Github app and update it in its respective place. )
  • After adding environment variables run dotenv rails server to start the application.

Developer Instructions

Developers can quickly get started by setting up the dev environment using the instructions above. To seed the database with some sample data, run 'bundle exec rake db:seed'. The admin credentials after seeding will be as follows:

User: Admin
Email: [email protected]
Password: password

For debugging include binding.pry anywhere inside the code to open the pry console.

Additional setup instructions for Ubuntu

Additional instructions can be found here and there are some extra notes for single user installations:

  • If you are facing difficulties installing RVM, most probably it is because of an older version of rvm shipped with Ubuntu's desktop edition and updating the same resolves the problem.

  • Run Terminal as a login shell so ruby and rails will be available.

    Removing RVM

    sudo apt-get --purge remove ruby-rvm` <br />
    sudo rm -rf /usr/share/ruby-rvm /etc/rvmrc /etc/profile.d/rvm.sh
    

    Installing new version of RVM

    curl -L https://get.rvm.io |
    bash -s stable --ruby --autolibs=enable --auto-dotfiles
    
  • If you are facing errors running the rails db:create ensure that the socket file(i.e mysql.sock) is present in that location. Some possible locations where it might be present is /run/mysqld/mysqld.sock or /var/lib/mysql/mysql.sock and mention the exact location.

Production Specific Instructions

bundle install --with pg --without development test
RAILS_ENV=production bundle exec rake assets:precompile
bundle exec sidekiq -e production -q default -q mailers -d -L tmp/sidekiq.log` (In production)

Code of Conduct

This repository contains the Code of Conduct of CircuitVerse Community.

CircuitVerse Community

We would love to hear from you 😄 Here are links to our:

Slack

Discord - This is an official fan communication channel. Thanks to @jbox1 for this initiative.

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

License

This project is licensed under the MIT License - see the LICENSE for details.