Hi, I would like to know what is the best way to manage Gemfile.lock file. I read that the Gemfile.lock should be check in version control. The fact is that commiting the generated Gemfile.lock will install the development and test gems on the production platform. Should I have to run *$> bundle install --without development test* before commiting the Gemfile.lock? Thanks in advance, Mickael -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 6 February 2012 15:07, Mickael Gerard <mikarun-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I would like to know what is the best way to manage Gemfile.lock file. > > I read that the Gemfile.lock should be check in version control. > > The fact is that commiting the generated Gemfile.lock will install the > development and test gems on the production platform. > > Should I have to run > $> bundle install --without development test > before commiting the Gemfile.lock?No need, that will not change the Gemfile.lock contents assuming you have previously run "bundle install". You should run it with --without development test on your production machine after checking out from your VCS, to install the required gems excluding those for development and test. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 6 February 2012 16:45, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 6 February 2012 15:07, Mickael Gerard <mikarun-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Should I have to run > > $> bundle install --without development test > > before commiting the Gemfile.lock? > > No need, that will not change the Gemfile.lock contents assuming you > have previously run "bundle install". You should run it with > --without development test on your production machine after checking > out from your VCS, to install the required gems excluding those for > development and test.I was only checking the content of the Gemfile.lock in the production platform, not the installed gems. Indeed only the needed gems are installed not the development and test ones Thanks, Mickael -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mon, Feb 6, 2012 at 10:07, Mickael Gerard <mikarun-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> The fact is that commiting the generated Gemfile.lock will install the > development and test gems on the production platform.Not if you have them properly separated out in your Gemfile (w/o .lock). Use groups to designate gems that are only for certain environments, or at least should be omitted from at least one other environment. For instance: ===8<---cut here--- source ''http://rubygems.org'' gem ''rails'', ''3.2.0'' # Gems used only for assets and not required # in production environments by default. group :assets do gem ''sass-rails'', ''~> 3.2.3'' gem ''coffee-rails'', ''~> 3.2.1'' gem ''uglifier'', ''>= 1.0.3'' end gem ''jquery-rails'' gem ''devise'' gem ''omniauth'' group :development do gem ''rspec-rails'' gem ''sqlite3'' end group :test do gem ''turn'', :require => false gem ''rspec-rails'' gem ''sqlite3'' gem ''factory_girl'' gem ''webrat'', ''0.7.1'' end group :production do # for heroku gem ''pg'' end ===8<---cut here--- -Dave -- Dave Aronson: Available Cleared Ruby on Rails Freelancer (NoVa/DC/Remote) -- see www.DaveAronson.com, and blogs at www.Codosaur.us, www.Dare2XL.com, www.RecruitingRants.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.