title: Whether to specify Gem versions compulsorily in Gemfile or not for rails application
body: <p>I want to know should I specify gem version for each gem I add to Gemfile or not. Earlier with few of my projects I didn't specified any versions for all the gems and bundler took care of it, which worked quite well as well.</p>
  
  <p>But recently I got to work on few project which were under development for last 6 month. In that project, many of gem versions were specified in Gemfile only and Gemfile.lock was ignored. That caused a lot headache to finally resolve version conflicts and upgrade few gems.</p>
  
  <p>Also got to know that it's bad practice to remove Gemfile.lock from application version control - nice article by yehuda - <a href="http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/">http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/</a></p>
  
  <p>So, my question is should I specify version for each and every gem I specifiy in Gemfile or just specify name and bundler will take care of version ? What is best practice to handle this ?</p>
  
  <p>UPDATE - </p>
  
  <p>Updating this question to correctly specify the problem, as a Gemfile sovles many problems :)</p>
  
  <p>Prob 1 - Every developer should have same version of gems.
  Actually adding Gemfile.lock into version control solved this problem. Developers just have to take care that they run 'bundle install'/'bundle' rather than 'bundle update' as this will update versions as well.</p>
  
  <p>Prob 2 - Some gems version, if changed, brakes application code.
  Actually with omniauth,there are this type of issues, as API are changed from one version to another. And yes, to keep application working, versions will need to be specified for this gems.</p>
  
  <p>My Prob. -
  So, in my gemfile, as versions for both A and B are strictly specified, and as they both depend on different versions of Z, which is there dependency, I even can't run the bundle install or bundle update. The only solution was to remove versions and let bundler to take the call. That's why I had question like - 
  Gemfile.version_specification_mandatory? #=> true/false</p>