Skip to content

eudavi-learn/uploader-image

Repository files navigation

Uploader Image

Simple example of how to storage your images in cloudinary storage and use it.

Clone the repository

git clone https://github.com/Davigl/uploader-image.git
cd uploader-image

Check your Ruby version

ruby -v

The ouput should start with something like ruby 2.5.1

If not, install the right ruby version using rbenv (it could take a while):

rbenv install 2.5.1

Install dependencies

`bundle install`

Set environment variables

Using Figaro:

Set config/application.yml with your cloudinary keys.

Initialize the database

rails db:create db:migrate

Add heroku remotes

Using Heroku CLI:

heroku git:remote -a project
heroku git:remote --remote heroku-staging -a project-staging

Server

rails s

Deploy

With Heroku pipeline (recommended)

Push to Heroku staging remote:

git push heroku-staging

Go to the Heroku Dashboard and promote the app to production or use Heroku CLI:

heroku pipelines:promote -a project-staging

Directly to production (not recommended)

Push to Heroku production remote:

git push heroku