簡體   English   中英

為什么 Ruby on Rails Azure Web 應用教程無法部署到遠程?

[英]Why does the Ruby on Rails Azure Web App Tutorial fail to deploy to the remote?

我正在嘗試將Ruby on Rails 教程部署到 Microsoft Azure 並在推送到遠程時繼續遇到相同的錯誤

remote: Bundle install with no 'without' options
remote: Defaulting gem installation directory to /tmp/bundle
remote: Defaulting site config directory to /home/site/config
remote: Using ruby version 2.6.2
remote: /home/site/wwwroot
remote: Found gemfile
remote: ~/site/wwwroot ~/site/repository
remote: Setting ruby version
remote: Running bundle clean
remote: /usr/local/.rbenv/versions/2.6.2/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.0.2) required by your /home/site/wwwroot/Gemfile.lock. (Gem::GemNotFoundException)
remote: Running bundle install
remote: To update to the latest version installed on your system, run `bundle update --bundler`.
remote: To install the missing version, run `gem install bundler:2.0.2`
remote:         from /usr/local/.rbenv/versions/2.6.2/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
remote:         from /usr/local/.rbenv/versions/2.6.2/bin/bundle:23:in `<main>'
remote: /usr/local/.rbenv/versions/2.6.2/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.0.2) required by your /home/site/wwwroot/Gemfile.lock. (Gem::GemNotFoundException)

嘗試修復:

  • 確保我的 Ruby 版本與 Azure web 應用程序 (2.6.2) 匹配
  • 嘗試了多個版本的 Bundler(1.17.3、2.0.2 和 2.2.15)
  • 確保我的 Gemfile 和 Gemfile.lock Bundler 版本匹配
  • 嘗試使用 Azure 的 Kudu Bash 交互來手動更新和安裝 gems(沒有這樣的命令)

Azure Web App 是否有特定版本的 Bundler? 有什么方法可以找出我應該使用哪個 Bundler 版本進行開發?

通過將我的 Bundler 版本降級到我安裝的默認版本(1.17.2),我能夠找到部署解決方案。 更新我的 Gemfile.lock 以反映當前(默認)版本后,推送到遠程成功。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM