2021-07-01から1ヶ月間の記事一覧

My SQL rootユーザのパスワードを再設定

パスワードなしでログイン mysql -u root 使うデータベースを標準のmysqlのものに変更します mysql> use mysql Database changed パスワードを再設定する mysql> UPDATE user SET authentication_string=password('新規パスワード') WHERE user='root'; Quer…

mysqlのエラー ERROR! The server quit without updating PID file

mysql.server startを入力した時、ERROR! The server quit without updating PID fileというエラーが発生した。 試したこと 以下の記事に書かれていることを試しました。 mysql 起動時のThe server quit without updating PID file エラーの回避法 - Qiita t…

gem 'fast_jsonapi'

fast_jsonapiとは Netflixが提供しているgemで、JSONのserializerです。jsonのserializerとは、jsonを生成する仕組みのことです。 シリアライズ(serialize)とは、プログラミングでオプジェクト化されたデータを、ファイルやストレージに保存したり、ネット…

An error occurred while installing puma (4.3.3), and Bundler cannot continue.

bundle update mimemagicをした後に、以下のエラーが発生しました。 An error occurred while installing puma (4.3.3), and Bundler cannot continue. Make sure that `gem install puma -v '4.3.3' --source 'https://rubygems.org/'` succeeds before bun…

bundle install --path vendor/bundleができなエラー

git cloneをした後、bundle install --path vendor/bundleをすると、以下のエラーが発生しました。 解決法 You'll need to update your bundle to a version other than mimemagic (0.3.4) that hasn't been removed in order to install.と記載されているの…

undefined method 'default' for ActionMailer:Module

原因 エラー文をよく見ると、 class ApplicationMailer < ActionMailer:: 継承文がなんかすごく変!途中で途切れていない? class ApplicationMailer < ActionMailer::Baseと書き直してあげると、解決できました。

Active Storage ActiveStorage::Attached

site.rb class Site < ApplicationRecord has_one_attached :og_image has_one_attached :favicon has_many_attached :main_images end favicon:アイコン画像 og_image:画像を1枚添付できる main_images:画像を複数枚添付できる これらをrails consoleで見て…

undefined method 'favicon' for nil:NilClass

突然以下のエラーに遭遇した。 application_controller def current_site # @current_siteがnillであれば、Site.firstを代入する。 @current_site ||= Site.first end helper_method :current_site current_siteはちゃんと定義できているしな〜... 原因がわ…