Varun
Varun

Reputation: 665

heroku how to install specific versions of gem dependencies

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.

Upvotes: 1

Views: 412

Answers (1)

tfe
tfe

Reputation: 34952

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.

Upvotes: 1

Related Questions