How to start a rails application guided by Odin Project, following git-flow and deployed to heroku.
- Ruby 2.6.5
- Rails 5.2.4
- VSCode
The project was designed to create an scaffolded application with rails, following git-flow practices and deploying to heroku.
If you want to deploy this application to your heroku account follow the instructions in this link.
You need to know
-
After
heroku create
you may need to add heroku as a remote source, use the following command:git remote add local-branch-name https://git.heroku.com/remote-app-123.git
or
heroku git:remote -a remote-app-123
Do this only if you don't see heroku
in the output of the command git remote
on your terminal. Visit Deploying with Git for more information.
-
Heroku is by default working only with code commited to master, but there is a way to force it to take your non master branch. You can type:
git push link-heroku-app local-branch:master
For more information on how to deploy to heroku visit the official Heroku documentation.
As an example, where https://git.heroku.com/afternoon-caverns-32087.git is the remote heroku repo and rails-app is your current branch, the next command should be typed to succesfully push to heroku:
git push https://git.heroku.com/afternoon-caverns-32087.git rails-app:master
- Finally, before pushing to heroku remember to remove .bundle folder so Heroku will create its own bundle when you push your code there, this is for fixing an issue like this one.
Running the program on local machine
Clone the repository to your local machine. To install gems run
bundle install
then run the server on https://localhost:3000
rails server
Visit the live demo here.
👤 Xóchitl Selene Flores Pérez
- Github: @enelesmai
- Twitter: @enelesmai
- Linkedin: xochitlselene
Contributions, issues and feature requests are welcome!
Feel free to check the issues.
Give a ⭐️ if you like this project!