コードロード

エラー討伐

Capistrano

【Rails×Capistrano】自動デプロイしようとしたら「ArgumentError: Missing `secret_key_base` for ‘production’ environment, set this string with `rails credentials:edit`」

エラー ArgumentError: Missing `secret_key_base` for ‘production’ environment, set this string with `rails credentials:edit` 結論 この記事通りにやればうまく行った。 qiita.com 原因 上の記事でも述べられているように、私も同じく下記の記事通りに…

【Rails×Capistrano】自動デプロイ中に「SassC::SyntaxError: Error: File to import not found or unreadable: ~bulma/bulma.」エラー

エラー 環境はRails 6.0.3.6、Ruby2.7.2、Vue 2.6.12 SassC::SyntaxError: Error: File to import not found or unreadable: ~bulma/bulma. on line 16:1 of app/assets/stylesheets/style.scss >> @import "~bulma/bulma"; 結論 パスを明示的に全部記載して…

【Rails×Capistrano】Gemfile not found (Bundler::GemfileNotFound)

解決方法 app/config/unicorn/production.rb に下記を追記 before_exec do |server| ENV["BUNDLE_GEMFILE"] = File.join(File.expand_path("../../../../", __FILE__), "current", "Gemfile") end ローカルにて下記コマンドでunicornをSTOPしてSTARTしてあげ…