0
0

More than 3 years have passed since last update.

railsチュートリアルでherokuへのpushができない

Posted at

これは何

  • ruby on railsのチュートリアルでherokuへアプリケーションをデプロイする場面があるのですが、以下のようなエラーで先に進めませんでした
remote: -----> Installing dependencies using bundler 2.2.21
remote:        Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
remote:        Your bundle only supports platforms ["x86_64-darwin-19"] but your local platform
remote:        is x86_64-linux. Add the current platform to the lockfile with `bundle lock
remote:        --add-platform x86_64-linux` and try again.
remote:        Bundler Output: Your bundle only supports platforms ["x86_64-darwin-19"] but your local platform
remote:        is x86_64-linux. Add the current platform to the lockfile with `bundle lock
remote:        --add-platform x86_64-linux` and try again.
remote: 
remote:  !
remote:  !     Failed to install gems via Bundler.
remote:  !
  • エラーメッセージにあるbundle lock --add-platform x86_64-linuxを試しても解決できず
  • 同様のエラーをぐぐるとbundlerのバージョン下げるべしとの記事も多数見つかるのですが、私の場合解決できませんでした。

どう解決した

  • Gemfile.lockのPLATFORMSにrubyを足す
PLATFORMS
  roby
  x86_64-darwin-19
  x86_64-linux
0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0