我正在将我的Heroku托管的ROR应用程序从Ruby1.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发布于 2018-12-07 08:04:05
只管用
ruby '~> 2.5.1'在你的Gemfile和
2.5.1在你的.ruby-version里
https://stackoverflow.com/questions/53663353
复制相似问题