ruby on rails - Use 2 versions of gem at same time -
can use 2 versions of gem in 1 application? i'm trying use 2 rails plugins work together:
- pengwynn's linkedin https://github.com/pengwynn/linkedin linkedin api calls, has dependency on oauth (~> 0.3.5)
- omniauth user login via multiple well-known websites, has dependency on oauth 0.4.0
when try in rails error message:
$ rails server c:/ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/resolver.rb:129:in `resolve': bundler not find compatible versions gem "oauth": (bundler::versionconflict) in snapshot (gemfile.lock): oauth (0.4.4) in gemfile: linkedin depends on oauth (~> 0.3.5) running `bundle update` rebuild snapshot scratch, using gems in gemfile, may resolve conflict.
trying bundle update freezes terminal
is possible use these both plugins @ same time?
using 2 versions of single gem means: use 2 versions of same class.
it's not possible without making modifications these gems. may try place created classes in module, resolve conflicts in methods imported other classes, , on. in general, not easy task, , effect not worth it.
what should in such cases ask gem maintainers update dependencies, or try yourself.
maybe can downgrade (use older version of) 1 of these gems, version in dependencies same.
Comments
Post a Comment