Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby Can';更新Gemfile_Ruby_Heroku_Heroku Toolbelt - Fatal编程技术网

Ruby Can';更新Gemfile

Ruby Can';更新Gemfile,ruby,heroku,heroku-toolbelt,Ruby,Heroku,Heroku Toolbelt,我正在将Heroku托管的ROR应用程序从Ruby 1.9.3升级到2.3.1p112 我在Heroku控制台上得到这个错误 remote: ! remote: ! Failed to install gems via Bundler. remote: ! Detected a mismatch between your Ruby version installed and remote: ! Ruby version specified in Gemfile o

我正在将Heroku托管的ROR应用程序从Ruby 1.9.3升级到2.3.1p112

我在Heroku控制台上得到这个错误

remote:  !
remote:  !     Failed to install gems via Bundler.
remote:  !     Detected a mismatch between your Ruby version installed and
remote:  !     Ruby version specified in Gemfile or Gemfile.lock. You can
remote:  !     correct this by running:
remote:  !     
remote:  !     $ bundle update --ruby
remote:  !     $ git add Gemfile.lock
remote:  !     $ git commit -m "update ruby version"
remote:  !     
remote:  !     If this does not solve the issue please see this documentation:
remote:  !     
remote:  !     https://devcenter.heroku.com/articles/ruby-versions#your-ruby-version-is-x-but-your-gemfile-specified-y
所以我做了这个,我不知道如何修复它?2.3.1集在哪里?如果我将Gemfile设置为2.3.1而不是2.3.1p112,那么推送到Heroku失败,它会给我上述错误

 MacBook-Pro-2:treesy-api me$ bundle platform --ruby
ruby 2.3.1p112
MacBook-Pro-2:treesy-api me$ bundler -v
Bundler version 1.17.1
MacBook-Pro-2:treesy-api me$ cat Gemfile.lock | grep -A 2 RUBY
RUBY VERSION
   ruby 2.3.1p112

MacBook-Pro-2:treesy-api me$ bundle update --ruby
Your Ruby version is 2.3.1, but your Gemfile specified 2.3.1p112
MacBook-Pro-2:treesy-api me$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin17]s
只用

ruby '~> 2.5.1'
在您的
GEM文件中

2.5.1

据我所知,在
.ruby版本中,通常不需要在任何地方指定修补程序版本。如果您的计算机上安装了任何版本的2.3.1,那么您的GEM文件应该是
ruby“2.3.1”
,然后在本地运行
bundle
,查看是否一切正常。那么它也应该适用于Heroku。