Reputation: 8065
When I type
gem list
I see
some_gem (1.18)
But when I check Gemfile.lock, I see
/Gemfile.lock
some_gem (1.23)
Can any explain this discrepancy? Is the gem version in the Gemfile.lock the authoritative version?
Upvotes: 0
Views: 131
Reputation: 5352
I quote the following from GemBunlder.com that the Gemfile.lock
The Gemfile.lock makes your application a single package of both your own code and the third-party code it ran the last time you know for sure that everything worked.
Further to this it also states that when you run the bundle install
command bundler will install gems on your system repository which are shown in your gem list
. Also you can run the following command gem list -r some_Gem
what this will do is check your remotely other avaliable versions for some_gem
. Also another command that would be useful to use is the bundle exec bundle cleanup
.
Update
If my explanation wasn't clear enough for you the purpose of doing gem list
will detail all the gem on your system. Whereas the gem version in the Gemfile.lock
is the version used in your app. In your case the version being used some_gem(1.2.3)
. BUT! the version that was installed on your system
was some_gem(1.18)
Hope this clarifies things
Upvotes: 1