【发布时间】:2021-07-08 12:09:18
【问题描述】:
在关注https://cloud.google.com/solutions/migrating-ruby-on-rails-apps-on-heroku-to-gke 时出现错误:
"/usr/local/lib/ruby/2.6.0/rubygems.rb:283:in find_spec_for_exe': Could not find 'bundler' (2.2.15) required by your /usr/src/app/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.2.15`
from /usr/local/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
from /usr/local/bin/bundle:23:in `<main>'"
当我尝试运行时:docker build -t ruby-app .
有人知道怎么回事吗?
【问题讨论】:
-
您是否已经尝试运行错误消息中建议的命令?
bundle update --bundler和gem install bundler:2.2.15 -
是的,我做到了,但无法在控制台中运行它们。将它们添加到 dockerfile 就可以了。请参阅下面的答案。
标签: ruby-on-rails docker kubernetes google-kubernetes-engine