Heroku最近發生了一些變化。因爲我已經做了我不能部署我的應用程序之前:在Heroku上部署,如何指定用於捆綁器的ruby版本?
[email protected] my-project (master) $ git push staging master
Counting objects: 52, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (51/51), done.
Writing objects: 100% (52/52), 159.47 KiB | 0 bytes/s, done.
Total 52 (delta 42), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Deleting 4 files matching .slugignore patterns.
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.3.0
remote: -----> Installing dependencies using bundler 1.13.6
remote: Your app was upgraded to bundler 1.13.6.
remote: Previously you had a successful deploy with bundler 1.11.2.
remote:
remote: If you see problems related to the bundler version please refer to:
remote: https://devcenter.heroku.com/articles/bundler-version
remote: Ruby version change detected. Clearing bundler cache.
remote: Old: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
remote: New: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Your Ruby version is 2.3.0, but your Gemfile specified 2.2.0
remote: Bundler Output: Your Ruby version is 2.3.0, but your Gemfile specified 2.2.0
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to my-project-staging.
remote:
To https://git.heroku.com/my-project-staging.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/my-project-staging.git'
我不明白這一點,我使用ruby 2.2.0
初起:
[email protected] my-project (master) $ ruby -v
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
[email protected] my-project (master) $ cat .ruby-version
2.2.0
[email protected] my-project (master) $ cat Gemfile | grep 'ruby'
ruby '2.2.0'
我不知道如何告訴捆綁器我仍然在使用ruby 2.2.0。我捆綁有這個底部:
RUBY VERSION
ruby 2.3.0p0
BUNDLED WITH
1.12.1
爲什麼捆綁不使用紅寶石2.2.0版本?它使用2.3.0代替...
你是否在你的Gemfile中這麼說?我的意思是,你有一條線**'紅寶石'2.2.0'**明確地說? –
[Heroku推送被拒絕,檢測到Ruby版本已更改,無法找到net-scp-1.0.6]的可能的重複(http://stackoverflow.com/questions/15033607/heroku-push-rejected-ruby-version-changed- detected-could-find-net-scp-1-0) – lcguida
@EddeAlmeida當然,$ cat的結果Gemfile | grep'ruby''是'ruby'2.2.0''。 –