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

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

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

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

Ruby

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

Heroku

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

Q&A

0回答

1538閲覧

bundler を更新後、へロクにディプロイできなくなる

Ryuto.dc

総合スコア1

Ruby on Rails 5

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

Ruby

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

Heroku

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

0グッド

0クリップ

投稿2020/05/27 01:26

編集2020/05/28 02:47

前提・実現したいこと

 git からセキュリティーアラートがきたので、gemを更新しようとbundle installしようとしたらエラーになる
エラーを見てみるとbundleを更新してくださいとあったので、更新してみると、bundle installできるようになりました。

その後下記の通りいろいろ試してるのですが、ドツボにはまってしまい、
ローカルで開くことも、へロクへディプロイすることもできなくなってしました。
お力添えをお願いいたします。

足りない情報があれば申しつけください。
よろしくお願いいたします。

発生している問題・エラーメッセージ

git push heroku master  ターミナル上の表示 remote: ###### WARNING: remote: Your app was upgraded to bundler 2.0.2. remote: Previously you had a successful deploy with bundler 1.17.3. 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.6.5 remote: -----> Installing dependencies using bundler 2.0.2 remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment 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: ! remote: ! Could not detect rake tasks remote: ! ensure you can run `$ bundle exec rake -P` against your app remote: ! and using the production group of your Gemfile. remote: ! [fog][DEPRECATION] Unable to load Fog::Atmos::Storage remote: ! [fog][DEPRECATION] Falling back to deprecated constant Fog::Storage::Atmos. The preferred format of service provider constants has changed from service::provider to provider::service. Please update this service provider to use the preferred format. remote: ! [fog][DEPRECATION] Unable to load Fog::Clodo::Compute remote: ! [fog][DEPRECATION] Falling back to deprecated constant Fog::Compute::Clodo. The preferred format of service provider constants has changed from service::provider to provider::service. Please update this service provider to use the preferred format. remote: ! [fog][DEPRECATION] Unable to load Fog::DigitalOcean::Compute remote: ! [fog][DEPRECATION] Falling back to deprecated constant Fog::Compute::DigitalOcean. The preferred format of service provider constants has changed from service::provider to provider::service. Please update this service provider to use the preferred format. remote: ! [fog][DEPRECATION] Unable to load Fog::Dnsimple::DNS remote: ! [fog][DEPRECATION] Falling back to deprecated constant Fog::DNS::Dnsimple. The preferred format of service provider constants has changed from service::provider to provider::service. Please update this service provider to use the preferred format. 中略 remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to

試したこと

gemfile.lockの削除と更新
rubyのバージョンを2.6.5 ⇨ 2.6.3に変更⇨ローカル環境が開けなくなる(下記詳細含む)
bunder 2.0.2にバージョン変更
上記実施のうえbundle install

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

・mac OS 10.13.6
・ruby2.6.5
・rails 5.2.4.2
bunder 2.0.2

追加で実施したこと
rubyとbundlerのバージョン変更(herokuないで対応のバージョンが決まっているとあったため)
$ brew update && brew upgrade ruby-build
$ rbenv install 2.6.3
$ rbenv local 2.6.3
$ gem install bundler -v 2.0.2
$ rm Gemfile.lock
$ bundle install 

gemfile source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby '2.6.3' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.2.4', '>= 5.2.4.2' # Use sqlite3 as the database for Active Record # gem 'sqlite3' # Use Puma as the app server gem "puma", ">= 3.12.6" # Use SCSS for stylesheets gem 'sass-rails', '~> 5.0' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0' # See https://github.com/rails/execjs#readme for more supported runtimes # gem 'mini_racer', platforms: :ruby gem 'jquery-rails' # Use CoffeeScript for .coffee assets and views gem 'coffee-rails', '~> 4.2' # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks gem 'turbolinks', '~> 5' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.5' # Use Redis adapter to run Action Cable in production # gem 'redis', '~> 4.0' # Use ActiveModel has_secure_password # gem 'bcrypt', '~> 3.1.7' gem 'bcrypt' gem 'carrierwave' # Use ActiveStorage variant # gem 'mini_magick', '~> 4.8' gem 'fog' # Use Capistrano for deployment # gem 'capistrano-rails', group: :development # Reduces boot times through caching; required in config/boot.rb gem 'bootsnap', '>= 1.1.0', require: false group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] end group :development do # Access an interactive console on exception pages or by calling 'console' anywhere in the code. gem 'web-console', '>= 3.3.0' gem 'listen', '>= 3.0.5', '< 3.2' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' gem 'letter_opener_web' end group :production do gem 'pg' end group :test do # Adds support for Capybara system testing and selenium driver gem 'capybara', '>= 2.15' gem 'sqlite3' gem 'selenium-webdriver' # Easy installation and use of chromedriver to run system tests with Chrome gem 'chromedriver-helper' end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

上記実施後rails s でローカル環境でサーバーが開けなくなりました、、、、
rails s 後
bin/rails: Bootsnap::LoadPathCache::FallbackScan
中略
.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': cannot load such file -- aliyun/oss (LoadError)
というエラーが発生してしましました。

bundle exec rake -Pを行うと下記が出てくる

rake aborted!
LoadError: cannot load such file -- aliyun/oss
(eval):1:in service_klass' /User/config/application.rb:7:in <top (required)>'
/Users//Rakefile:4:in require_relative' /Users//Rakefile:4:in <top (required)>'
/Users/.rbenv/versions/2.6.3/bin/bundle:23:in load' /Users/.rbenv/versions/2.6.3/bin/bundle:23:in <main>'

Caused by:
Bootsnap::LoadPathCache::FallbackScan:

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

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

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

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

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

Mashiro

2020/06/10 10:22

rails tmp:cache:clearで、キャッシュを削除して状況変わります?
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問