简体   繁体   中英

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

I am trying to deploy the Ruby on Rails tutorial to Microsoft Azure and keep running into the same error when pushing to the remote :

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)

Attempted Fixes:

  • Made sure that my Ruby version matches the Azure web app's (2.6.2)
  • Tried multiple versions of Bundler (1.17.3, 2.0.2, and 2.2.15)
  • Made sure my Gemfile and Gemfile.lock Bundler versions match
  • Tried using Azure's Kudu Bash interaction to manually update and install gems (no such command)

Is there a specific version of Bundler that the Azure Web App is requesting? Is there any way to find out which Bundler version I should be using for development?

I was able to find a solution to deployment by downgrading my Bundler version to the default version on my installation (1.17.2). After updating my Gemfile.lock to reflect the current (default) version the push to the remote was successful.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM