Answer the question
In order to leave comments, you need to log in
What happens if Gem has a different mysql dependency? is it worth the trouble?
I am writing gem.
This gem needs a db.
But I had a reasonable question, what will happen if the versions of the muscle or postgres intersect with the application.
What do they do in this case?
Answer the question
In order to leave comments, you need to log in
In a gemspec, you specify a dependency on other gems, indicating the desired version. When installing your gem along with other gems, bundler finds and installs a dependency version that satisfies all requests from all gems and requests from the Gemfile.
If such a version is not found, then a conflict will arise, about which the bundler will inform you.
For example, in the gem 'your_gem' you have specified the dependency
and in the gem file of the application
gem 'your_gem'
gem 'pg', '= 9.2' # Будет конфликт т.к. your_gem требует pg > 9.2
gem 'pg', '>= 9.2' # Конфликта нет, установится последняя версия >= 9.5
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question