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

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

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

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

Ruby on Rails

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

Q&A

解決済

1回答

883閲覧

Ruby 2.7でアプリ作成時にbundler 2.1.3エラーが出る

no1knows

総合スコア3365

Ruby

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

Ruby on Rails

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

1グッド

1クリップ

投稿2020/01/08 03:38

前提・実現したいこと

Ruby 2.7でアプリ作成時にbundler 2.1.3エラーを解決したい。(Rails6)

実施した手順

brew update brew upgrade ruby-build rbenv install 2.7.0 rbenv global 2.7.0 gem update bundler bundler -v -> Bundler version 2.1.3 ⇒アプリ作成

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

エラー抜粋

Could not find 'bundler' (2.1.3) required by your /Users/xxx/RubymineProjects/untitled2/Gemfile.lock. (Gem::GemNotFoundException)

エラー部分

Warning: the running version of Bundler (2.1.2) is older than the version that created the lockfile (2.1.3). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.1.3`. Traceback (most recent call last): 15: from bin/rails:8:in `<main>' 14: from bin/rails:8:in `require_relative' 13: from /Users/xxx/RubymineProjects/untitled2/config/boot.rb:3:in `<top (required)>' 12: from /Users/xxx/.rbenv/versions/2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require' 11: from /Users/xxx/.rbenv/versions/2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require' 10: from /Users/xxx/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/setup.rb:10:in `<top (required)>' 9: from /Users/xxx/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/ui/shell.rb:88:in `silence' 8: from /Users/xxx/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/ui/shell.rb:136:in `with_level' 7: from /Users/xxx/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/setup.rb:10:in `block in <top (required)>' 6: from /Users/xxx/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler.rb:149:in `setup' 5: from /Users/xxx/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/runtime.rb:22:in `setup' 4: from /Users/xxx/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/shared_helpers.rb:76:in `set_bundle_environment' 3: from /Users/xxx/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/shared_helpers.rb:297:in `set_bundle_variables' 2: from /Users/xxx/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/rubygems_integration.rb:223:in `bin_path' 1: from /Users/xxx/.rbenv/versions/2.7.0/lib/ruby/2.7.0/rubygems.rb:252:in `bin_path' /Users/xxx/.rbenv/versions/2.7.0/lib/ruby/2.7.0/rubygems.rb:275:in `find_spec_for_exe': Could not find 'bundler' (2.1.3) required by your /Users/xxx/RubymineProjects/untitled2/Gemfile.lock. (Gem::GemNotFoundException) To update to the latest version installed on your system, run `bundle update --bundler`. To install the missing version, run `gem install bundler:2.1.3`

Gemfile.lock(BUNDLED WITH 2.1.3となっている)

GEM remote: https://rubygems.org/ specs: actioncable (6.0.2.1) actionpack (= 6.0.2.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) actionmailbox (6.0.2.1) actionpack (= 6.0.2.1) activejob (= 6.0.2.1) activerecord (= 6.0.2.1) activestorage (= 6.0.2.1) activesupport (= 6.0.2.1) mail (>= 2.7.1) actionmailer (6.0.2.1) actionpack (= 6.0.2.1) actionview (= 6.0.2.1) activejob (= 6.0.2.1) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) actionpack (6.0.2.1) actionview (= 6.0.2.1) activesupport (= 6.0.2.1) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) actiontext (6.0.2.1) actionpack (= 6.0.2.1) activerecord (= 6.0.2.1) activestorage (= 6.0.2.1) activesupport (= 6.0.2.1) nokogiri (>= 1.8.5) actionview (6.0.2.1) activesupport (= 6.0.2.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) activejob (6.0.2.1) activesupport (= 6.0.2.1) globalid (>= 0.3.6) activemodel (6.0.2.1) activesupport (= 6.0.2.1) activerecord (6.0.2.1) activemodel (= 6.0.2.1) activesupport (= 6.0.2.1) activestorage (6.0.2.1) actionpack (= 6.0.2.1) activejob (= 6.0.2.1) activerecord (= 6.0.2.1) marcel (~> 0.3.1) activesupport (6.0.2.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) zeitwerk (~> 2.2) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) bindex (0.8.1) bootsnap (1.4.5) msgpack (~> 1.0) builder (3.2.4) byebug (11.0.1) capybara (3.30.0) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) regexp_parser (~> 1.5) xpath (~> 3.2) childprocess (3.0.0) concurrent-ruby (1.1.5) crass (1.0.5) erubi (1.9.0) ffi (1.11.3) globalid (0.4.2) activesupport (>= 4.2.0) i18n (1.7.0) concurrent-ruby (~> 1.0) jbuilder (2.9.1) activesupport (>= 4.2.0) listen (3.1.5) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) ruby_dep (~> 1.2) loofah (2.4.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) marcel (0.3.3) mimemagic (~> 0.3.2) method_source (0.9.2) mimemagic (0.3.3) mini_mime (1.0.2) mini_portile2 (2.4.0) minitest (5.13.0) msgpack (1.3.1) nio4r (2.5.2) nokogiri (1.10.7) mini_portile2 (~> 2.4.0) public_suffix (4.0.2) puma (4.3.1) nio4r (~> 2.0) rack (2.0.8) rack-proxy (0.6.5) rack rack-test (1.1.0) rack (>= 1.0, < 3) rails (6.0.2.1) actioncable (= 6.0.2.1) actionmailbox (= 6.0.2.1) actionmailer (= 6.0.2.1) actionpack (= 6.0.2.1) actiontext (= 6.0.2.1) actionview (= 6.0.2.1) activejob (= 6.0.2.1) activemodel (= 6.0.2.1) activerecord (= 6.0.2.1) activestorage (= 6.0.2.1) activesupport (= 6.0.2.1) bundler (>= 1.3.0) railties (= 6.0.2.1) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) railties (6.0.2.1) actionpack (= 6.0.2.1) activesupport (= 6.0.2.1) method_source rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) rake (13.0.1) rb-fsevent (0.10.3) rb-inotify (0.10.1) ffi (~> 1.0) regexp_parser (1.6.0) ruby_dep (1.5.0) rubyzip (2.0.0) sass-rails (6.0.0) sassc-rails (~> 2.1, >= 2.1.1) sassc (2.2.1) ffi (~> 1.9) sassc-rails (2.1.2) railties (>= 4.0.0) sassc (>= 2.0) sprockets (> 3.0) sprockets-rails tilt selenium-webdriver (3.142.7) childprocess (>= 0.5, < 4.0) rubyzip (>= 1.2.2) spring (2.1.0) spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) sprockets (4.0.0) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.2.1) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) sqlite3 (1.4.2) thor (1.0.1) thread_safe (0.3.6) tilt (2.0.10) turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) tzinfo (1.2.6) thread_safe (~> 0.1) web-console (4.0.1) actionview (>= 6.0.0) activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) webdrivers (4.2.0) nokogiri (~> 1.6) rubyzip (>= 1.3.0) selenium-webdriver (>= 3.0, < 4.0) webpacker (4.2.2) activesupport (>= 4.2) rack-proxy (>= 0.6.1) railties (>= 4.2) websocket-driver (0.7.1) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.4) xpath (3.2.0) nokogiri (~> 1.8) zeitwerk (2.2.2) PLATFORMS ruby DEPENDENCIES bootsnap (>= 1.4.2) byebug capybara (>= 2.15) jbuilder (~> 2.7) listen (>= 3.0.5, < 3.2) puma (~> 4.1) rails (~> 6.0.2, >= 6.0.2.1) sass-rails (>= 6) selenium-webdriver spring spring-watcher-listen (~> 2.0.0) sqlite3 (~> 1.4) turbolinks (~> 5) tzinfo-data web-console (>= 3.3.0) webdrivers webpacker (~> 4.0) RUBY VERSION ruby 2.7.0p0 BUNDLED WITH 2.1.3

試したこと

・Gemfile.lock を削除して再度 bundle install
bundle complete後、bin/rails passwordless:install:migrations ⇒ 同じエラー

・Rubymineを利用せずTerminalだけでアプリ作成 ⇒ 同じエラー

bundle initからTerminalだけでアプリ作成 ⇒ 同じエラー

DrqYuto👍を押しています

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

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

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

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

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

guest

回答1

0

自己解決

ver 2.6.xにしました。

投稿2020/11/26 01:17

no1knows

総合スコア3365

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.50%

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

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

質問する

関連した質問