简体   繁体   中英

How can I specify a Rack version on Heroku?

I'm experiencing an error with a Rails application as described in https://github.com/rack/rack/issues/386 . The fix is to use the latest version of Rack available on Rack's master branch. I can modify my Gemfile to use the master branch locally, but it seems like Heroku is ignoring it and continues using the gem from RubyGems.

Here is the line in the GemFile.

gem 'rack', :git => 'git://github.com/rack/rack'

Is it possible to force Heroku to use the master branch or Rack?

It turns out gem 'rack', :git => 'git://github.com/rack/rack' does in fact work. My problem was I was pushing to heroku from a branch that was not the master, and heroku will only use the master branch of your repository unless you specify otherwise.

The correct way to push in such a situation is

git push heroku mybranch:master

That was a difficult way to learn the correct method for pushing branches to heroku. I'm sure I'll never forget it now.

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