[RUBY] Released the No Todo app instead of Todo. .. (And notes on ridgepole)

Preface

https://notodoo.herokuapp.com/ This time, I made a web application called No Todo. Have you ever made a to-do list and felt "too much to do!"? But on the contrary, there are many things that you do not have to do By reducing waste, you can save time on what you really need to do. This web app is for creating such a "to-do list" (No Todo). You can also publish the list on Twitter.

NoTodo>

Technology used

rails6 heroku hobby plan (it's hard to sleep if it's free) I haven't acquired a domain.

Gem used (partially omitted)

gem 'rspec-rails'
gem 'factory_bot_rails'
gem 'ridgepole'
gem 'devise'
gem 'omniauth-facebook'
gem 'omniauth-google-oauth2'
gem 'dotenv-rails'
gem 'devise-i18n'
gem 'devise-i18n-views'
gem 'activeadmin'
gem 'rails-i18n'

The first ones I used this time are rspec, factory_bot_rails, ridgepole and omniauth-facebook. Especially this time I will write about ridgepole.

Introduction

For the first time, I made a smartphone-first site. Until now, it has always been a PC-first site.

NOtodotop.png

↑ Top page before login No Todo is more prominent instead of Todo. SNS authentication is implemented on the registration page. (There are times when facebook authentication is not working properly. If you can not, please write in the comments of this Qiita article.)

notodo2.png

↑ Top page after login There are pages that will continue to be displayed and pages that will be hidden the next day after saving, but the design is the same.

ridgepole

It's very convenient as an impression after using it. It's very easy and smart to not have to create a migrate file one by one. It was my first time, so I stumbled quite a bit. This time I will explain two of them.

migrate


create_table :posts do |t|

ridgepole


create_table "posts" do |t|

It's different. You may laugh, but if you copy it from migration as it is and move it, you will be quite addicted to it at first. I wanted the grammar to be the same if possible (maybe for some reason).

This is the most addictive point when publishing this site. Usually at the end when publishing on heroku

heroku run rails db:migrate

I think I'll hit, but it's hard to do this.

heroku run 'bundle exec ridgepole -c config/database.for.heroku.ridgepole.yml -E production -f db/Schemafile --apply'

Really should have done this. However, resetting the DB no longer cures it. There may be other ways, but in my case I deleted the app and did it from heroku create. It took me a whole day to understand this (crying) By the way, when doing seed, heroku run rails db: seed is fine.

Advantages and disadvantages of using ridgepole

merit

・ You do not have to create a migrate file each time. ・ One file is enough.

Demerit

・ Commands are difficult to remember

bundle exec ridgepole -c config/database.for.heroku.ridgepole.yml -E development -f db/Schemafile --apply

I can't remember how long it is. You have to go back to each command.

・ The error is unfriendly

This may be just my lack of skill, but I think the error is hard to understand. I'm sorry I couldn't give you a sample.

Summary

I wrote a lot, but anyway, No Todo please.

https://notodoo.herokuapp.com/

Recommended Posts

Released the No Todo app instead of Todo. .. (And notes on ridgepole)
Notes on Java path and Package
Released the No Todo app instead of Todo. .. (And notes on ridgepole)
Notes on Java's Stream API and SQL
Ruby on Rails ~ Basics of MVC and Router ~
Upload and download notes in java on S3
Notes on Protocol Buffers
python notes on docker
[Android] Notes on xml
credentials.yml.enc and master.key <Notes>
Notes on regular expressions
Modules and Mixins notes
Get the acceleration and bearing of the world coordinate system on Android
This and that of the JDK
Notes on calling Installer on Android App
Notes on Java path and Package
I stumbled upon the development and publication of my first iPhone app
Creating an app and deploying it for the first time on heroku