質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Amazon S3

Amazon S3 (Simple Storage Service)とはアマゾン・ウェブ・サービスが提供するオンラインストレージサービスです。

Q&A

解決済

1回答

1153閲覧

herokuにデプロイする際に発生した画像アップデート機能周りのエラーについて教えてください。

hatimitu

総合スコア4

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Amazon S3

Amazon S3 (Simple Storage Service)とはアマゾン・ウェブ・サービスが提供するオンラインストレージサービスです。

0グッド

0クリップ

投稿2020/01/14 16:11

前提・実現したいこと

herokuにrailsアプリをデプロイしようとしたところ、エラーが発生しました。

画像アップロード機能が怪しいようでして、carrierwaveやS3についていろいろと検索をしてみたのですが、どうしても解決することができなかったので、お力添えお願いします。

該当のソースコード

remote: Compressing source files... done. remote: Building source: remote: remote: -----> Ruby app detected remote: -----> Compiling Ruby/Rails remote: remote: ###### WARNING: remote: remote: Your app was upgraded to bundler 1.17.3. remote: Previously you had a successful deploy with bundler 2.0.2. remote: remote: If you see problems related to the bundler version please refer to: remote: https://devcenter.heroku.com/articles/bundler-version#known-upgrade-issues remote: remote: remote: -----> Using Ruby version: ruby-2.5.7 remote: -----> Vendoring libpq 5.12.1 remote: -----> Removing BUNDLED WITH version in the Gemfile.lock remote: remote: ###### WARNING: remote: remote: You have the `.bundle/config` file checked into your repository remote: It contains local state like the location of the installed bundle remote: as well as configured git local gems, and other settings that should remote: not be shared between multiple checkouts of a single repo. Please remote: remove the `.bundle/` folder from your repo and add it to your `.gitignore` file. remote: https://devcenter.heroku.com/articles/bundler-configuration remote: remote: -----> Installing dependencies using bundler 1.17.3 remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment remote: Your Gemfile lists the gem sass-rails (~> 5.0) more than once. remote: You should probably keep only one of them. remote: Remove any duplicate entries and specify the gem only once (per group). remote: While it's not a problem now, it could cause errors if you change the version of one of them later. remote: The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. remote: Fetching gem metadata from https://rubygems.org/............ #中略# remote: Post-install message from i18n: remote: remote: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. remote: But that may break your application. remote: remote: Please check your Rails app for 'config.i18n.fallbacks = true'. remote: If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be remote: 'config.i18n.fallbacks = [I18n.default_locale]'. remote: If not, fallbacks will be broken in your app by I18n 1.1.x. remote: remote: For more info see: remote: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0 remote: #中略# remote: Bundle completed (22.09s) remote: Cleaning up the bundler cache. remote: -----> Installing node-v10.15.3-linux-x64 remote: -----> Detecting rake tasks remote: -----> Preparing app for Rails asset pipeline remote: Running: rake assets:precompile remote: rake aborted! remote: LoadError: cannot load such file -- fog remote: /tmp/build_e3766452655dfe4127d73b40ff4b1dbd/vendor/bundle/ruby/2.5.0/gems/activesupport-5.1.7/lib/active_support/dependencies.rb:292:in `require' remote: #中略# remote: /tmp/build_e3766452655dfe4127d73b40ff4b1dbd/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define' remote: /tmp/build_e3766452655dfe4127d73b40ff4b1dbd/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>' remote: Tasks: TOP => environment remote: (See full trace by running task with --trace) remote: remote: ! remote: ! Precompiling assets failed. remote: ! remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to my-bbs-app. remote:

補足情報(FW/ツールのバージョンなど)

Gemfile

source 'https://rubygems.org' git_source(:github) do |repo_name| repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") "https://github.com/#{repo_name}.git" end # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.1.6' gem 'devise', '~> 4.5.0' gem 'devise-i18n-views' gem 'jquery-rails' gem 'bootstrap-sass', '3.3.7' gem 'sass-rails', '~> 5.0' gem 'carrierwave', '1.2.1' gem 'mini_magick', '4.7.0' gem 'will_paginate', '3.1.6' gem 'bootstrap-will_paginate', '1.0.0' gem 'rails-controller-testing' gem 'puma', '~> 3.7' gem 'sass-rails', '~> 5.0' gem 'uglifier', '>= 1.3.0' gem 'coffee-rails', '~> 4.2' gem 'turbolinks', '~> 5' gem 'jbuilder', '~> 2.5' group :development, :test do gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] gem 'capybara', '~> 2.13' gem 'selenium-webdriver' end group :development do gem 'web-console', '>= 3.3.0' gem 'listen', '>= 3.0.5', '< 3.2' gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' gem 'sqlite3' end group :production do gem 'pg' gem 'fog-aws', '2.0.0' end gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

carrier_wave.rb

if Rails.env.production? CarrierWave.configure do |config| config.storage :fog config.fog_provider = 'fog/aws' config.fog_credentials = { :provider => 'AWS', :region => ENV['S3_REGION'], :aws_access_key_id => ENV['S3_ACCESS_KEY'], :aws_secret_access_key => ENV['S3_SECRET_KEY'] } config.fog_use_ssl_for_aws = true config.fog_public = false config.fog_attributes = { cache_control: "public, max-age=#{365.days.to_i}" } config.fog_directory = ENV['S3_BUCKET'] end end

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

自己解決できました。
carrirwaveの周りには問題がなかったようで、
WARNING:
と書かれている部分を片っ端から解決していったら、デプロイが通るようになりました。

投稿2020/01/15 04:14

hatimitu

総合スコア4

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問