开发者

heroku how to install specific versions of gem dependencies

开发者 https://www.devze.com 2023-01-25 05:22 出处:网络
I have an application on Heroku that runs on Rails 开发者_运维百科2.3.5 it also uses oauth2 gem.

I have an application on Heroku that runs on Rails 开发者_运维百科2.3.5 it also uses oauth2 gem.

when I deploy the application, it automatically installs the oauth2 gem (as it should because i've stated it in the .gems file) but it installs the latest version of Rack (version 1.2.1) because oauth2 depends on Rack.

since Rails 2.3.5 is not compatible with Rack > 1.1.0, my application crashes after deployment.

My question is, how do i specify which version of Rack to install as a dependency of oauth2.

I tried adding rack --version 1.0.0 to the .gems file, it still installs version 1.2.1 and then 1.0.0 which, again, causes the application to crash.

Thanks.


If you're using a .gems manifest, then add the flag --ignore-dependencies to the oauth2 line. Then add in all of its dependencies by hand, specifying versions as you need to.

0

精彩评论

暂无评论...
验证码 换一张
取 消