Skip to content

How to start a Rails application guided by Odin Project

Notifications You must be signed in to change notification settings

enelesmai/odin-on-rails

Repository files navigation

odin_on_rails

How to start a rails application guided by Odin Project, following git-flow and deployed to heroku.

Built With

  • Ruby 2.6.5
  • Rails 5.2.4
  • VSCode

Getting Started

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

  1. 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.

  1. 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
  1. 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 

Live Demo

image

Visit the live demo here.

Author

👤 Xóchitl Selene Flores Pérez

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the issues.

Show your support

Give a ⭐️ if you like this project!

About

How to start a Rails application guided by Odin Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published