[RUBY] We have released an app "Public Diary" that allows you to easily publish your diary.

Since we released the web application again, we introduced (promoted) it, and this lesson? I would like to introduce something like.

https://public-diary.herokuapp.com/

What I used

Language / framework ... the usual ruby and rails. Server ... heroku Original domain ... I haven't acquired it now.

Gem used

gemfile


gem 'devise'  #New registration / login
gem 'carrierwave'  #Image upload
gem 'kaminari'  #Pagination
gem 'devise-i18n'  #devise Japanese localization
gem 'devise-i18n-views'  #devise Japanese localization
gem 'activeadmin'  #Management screen
gem 'rails-i18n'   #Localizing into Japanese
gem 'rack-attack' #IP address authentication

Other than this, it is almost the same as the initial stage. I want to graduate from devise soon.

Introduction

公開日記top.png

It has a simple design with light blue as an accent color. By the way, the color code is # 82aaaa.

公開日記show.png It's a show page Just like the top page, it's simple.

What I learned this time

webpacker

For the first time, we introduced boostap with webpacker. I used to do assets even though I used to do it with rails6. However, because of that, I had a very difficult time building the production environment. Even though I first introduced it with webpacker, I was always in trouble because I just did rails assets: precompile and it wasn't reflected. I didn't know that the webpacker was the cause in the first place, so it took a lot of time to resolve it. Eventually I found this site and solved it. If you use Webpacker, you should know at least this

rails webpacker:compile RAILS_ENV=production

Later this time, is it because I overdo rails assets: precompile in vain?

rails assets:clobber

There were times when it didn't work unless I reset assets. If css is not reflected in the production environment no matter how much you try, it may be one way to reset by doing rails assets: clobber.

Management screen

I totally like this rails_admin active_admin Administrate After using, I thought that active_admin was the best. It is easy to use even in the initial state, and it is reasonably customizable. I will use active_admin for the management screen except when I make my own. The following are recommended articles related to the management screen.

I compared rails management screen gems Create the fastest management screen with Rails!

heroku

I had a hobby plan contract from the beginning, but at first I don't think that many people will come, so at first I thought that the free version would be fine. There are 1000 hours (I hope 1000 hours will not be enough ...)

Summary

This time, I used the one from togmarks as it is, and focused on efficiency, but togmarks It took longer than UTOG / items / 89e2e6b9ad13e1cb5f7f). From the next time, I will check webpacker properly before using it. Thank you for reading.

https://public-diary.herokuapp.com/

~~ After that, my smartphone is not yet supported, so I will do something about it. ~~ It became compatible with smartphones on June 17th.

Recommended Posts

We have released an app "Public Diary" that allows you to easily publish your diary.
We have released a service that allows you to easily create chats!
We have released "Code-sell", a service that allows you to sell codes! (Personal development)
I tried to make an app that allows you to post and chat by genre ~ App overview ~
Create an app that uses the weather API to determine if you need an umbrella.