Ruby on Rails, also known as RoR or Rails, is an open source web application framework written in the Ruby programming language, following the Model View Controller (MVC) pattern paradigm.
Developer Site
and
company site
For the contribution to open source projects, a few simple steps must be followed that work the successful interaction between developers and an organized work flow; The steps to follow are detailed below.
Several quick start options are available:
- Fork of the source repository:
- To do this, go to your github account.
- Locate the repository in which you are going to collaborate.
- In the upper right corner, locate the fork icon and click on it.
- This makes an exact copy of the repository in the profile of the contributing user.
- Clone the repository:
- Once the Fork is made, the forked repository must be cloned, with the following Command:
-
git clone https://github.com/afleones/Ecommerce.git
- Enter the cloned folder:
-
cd Ecommerce
- Check connections to remote sources:
-
git remote -v
- Add a remote connection to the original repository:
-
git remote add upstream https://github.com/afleones/Ecommerce.git (forked)
- Optional, rename the remote connection. In order to avoid confusion, in the previous step a local connection was created with the original repository named upstream, this
name can be changed to a more personalized one with the following command:
-
git remote rename origin fork
We already have a copy of the original repository, now we will work on the daily workflow.
Have a bug or a feature request? Please first read the issue guidelines and search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue.
- First of all update local main branch with latest changes, with the command: git pull -r (name of remote source) main
- We create the requirement or functionality, in the workflow tool, trello or github issues (our github)
- Optional we create a branch for the development of the issue.
- We work and complete the tasks.
- We run:
-
and check the files that have undergone changes.
git status
- We run:
-
and we add all the changes to the stash.
git add .
- We commit the changes with:
-
git commit -m "Here the commit title"
- We carry out a push to our repository with:
-
git push origin main
- (Taking into account that the romoto of our repository is called origin and the branch to which we are going to send the work is called master). 10.We go to the github page and enter our repository. 11.We create a new pull request, which is sent to the original repository.
- Ruby version: 2.7.1
- Rails version:6.1.3
- Postgres Adapter:
- The first step is to make sure you use Postgres, so specify this when cloning the application:
- In your Gemfile add the PostGIS ActiveRecord adapter:
- In your Gemfile add the PostGIS ActiveRecord adapter:
-
gem 'activerecord-postgis-adapter'
- use it in your config/database.yml:
change the adapter from postgresql to postgis, Example: adapter: postgis - add the PostGIS extension:
- use it in your config/database.yml:
-
rails db:gis:setup
Andres Leones
Code and documentation copyright 2021 the Author