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.
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.
For the first time, I made a smartphone-first site. Until now, it has always been a PC-first site.
↑ 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.)
↑ 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.
・ You do not have to create a migrate file each time. ・ One file is enough.
・ 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.
I wrote a lot, but anyway, No Todo please.
https://notodoo.herokuapp.com/
Recommended Posts