エラー

rails newでアプリを立ち上げるまで postgresql

やりたいこと rails newしてアプリを作成していきたいが、様々なエラーに出くわしたので改善していきます。DBはpostgresqlを使用します。 エラー内容 エラー1 % rails _6.0.4_ new calender --database=postgresql --skip-test 2: from /Users/urakamitakuy…

Herokuデプロイ時のエラー enum

やりたいこと Herokuにデプロイした後、ページを開く事ができなかったのでheroku logs --taillで確認したところ以下のエラーが発生していた。このエラーを解消したい。 ActionView::Template::Error (undefined method `humanize' for 0:Integer): <p>店舗名:<</p>…

rspec実行時 OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)

やりたいこと bundle exec rspec テストを正常に走らせたい。 エラー内容 OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate) OpenSSL::SSL::SSLErrorが発生し、bun…

エラーメッセージの個別表示

やりたいこと form個々にバリデーションのエラーメッセージを表示する 調査内容 techtechmedia.com blog.yuhiisk.com 実装 _error_messages.html.erb <% if object.errors.any? %> <div id="error_messages" class="alert-message"> <ul class="mb-0"> <% object.errors.full_messages_for(text).each do |msg| %> <li><%= msg %></li> </ul></div>…

bucket.rb:885:in `extract_name': Cannot load `Rails.config.active_storage.service`: (ArgumentError) missing required option :name

herokuにデプロイしたいけどエラーが発生 やりたいこと git push heroku main heroku open でherokuにデプロイしたい。 エラー内容 heroku run rails c エラー原因を調べると bucket.rb:885:in `extract_name': Cannot load `Rails.config.active_storage.se…

railsにvue.jsをインストールしたときのエラー

rails webpacker:install:vue railsにwebpackerを使って導入する。 app.vue <template> <div id="app"> <p>{{ message }}</p> </div> </template> <script> export default { data: function () { return { message: "Hello Vue!" } } } </script> <style scoped> p { font-size: 2em; text-align: center; } </style> app.vueを layou…

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…

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と書き直してあげると、解決できました。

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はちゃんと定義できているしな〜... 原因がわ…