On Sat, Jul 12, 2014 at 10:21 AM, jagori samajdar <[email protected]> wrote: > > I had a doubt in Gemfile.lock. > Could we have multiple versions of a gem? >
I am not sure what you are asking here. If you are asking if a Ruby script/application can at the same time use two different versions of the same gem, then the answer is no. (I might be wrong, but I think I understand Bundler/Rubygems that much.) > Say for the snippet pasted below from Gemfile.lock(rspec part,I could see > multiple versions) : > > > > > > > > > *rspec (2.99.0) rspec-core (~> 2.99.0) rspec-expectations (~> > 2.99.0) rspec-mocks (~> 2.99.0) rspec-core (2.99.1) rspec-expectations > (2.99.0) diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.99.1)* > > Can't we just use rspec-core(2.99.1) or just maybe rspec-core (~> 2.99.0) > after all ~> probably means >=2.99.0 and < 3.0(correct me if am wrong). > > or is it maybe there are certain features which run on a specific version > and are not supported by other version and hence we had to include both? > As far as I understand things, the above lines say: - rspec gem requires rspec-core 2.99.0 or newer - there is a newer version of rspec-core, 2.99.1 - the newer version is used For more information see Bundler documentation[1], or ask. Željko -- 1: http://bundler.io/v1.6/rationale.html
_______________________________________________ QA mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/qa
