Re: You have modified your Gemfile in development but did not check the resulting snapshot (Gemfile.lock) into version control

2010-10-12 Thread stephen murdoch

thank you so much :)

i had no idea you could do this and it works perfectly!


On Oct 12, 5:44 am, Chris Hanks christopher.m.ha...@gmail.com wrote:
 First, to prevent Heroku from installing certain gems, use the
 BUNDLE_WITHOUT config var to specify groups you want to skip. For
 example, I do:

 heroku config:add BUNDLE_WITHOUT=development test

 Then, in my Gemfile:

 source :rubygems
 gem 'rails', '3.0.0'
 group :development, :test do
   gem 'rspec-rails', '2.0.0'
   # etc...
 end

 Now Heroku won't install any of the rspec gems.

 Second, try running bundle update after updating a gem in the
 Gemfile, and it will recalculate all your dependencies and update your
 Gemfile.lock for you. What's even better, though, is to only update
 gems you specify - for example, run bundle update rails if you
 change the rails version in your Gemfile. That way, Bundler will only
 update the things it really needs to, which is safer.

 On Oct 11, 9:09 pm, stephen murdoch stephenjamesmurd...@gmail.com
 wrote:

  I get this error message every now and then:

  You have modified your Gemfile in development but did not check the
  resulting snapshot (Gemfile.lock) into version control

  Most people suggest removing the .bundle directory and running bundle
  install again making sure to add Gemfile.lock to the git repo before
  committing and pushing to heroku but that doesn't always resolve the
  problem.

  The easiest way to fix this is by removing Gemfile.lock and pushing to
  heroku without it.  Heroku then bundles your gems for you, but informs
  you that you will soon be required to include a Gemfile.lock.

  I am trying to get my head round this problem.

  Can anyone tell my why this happens?

  I have on occasions tried wrapping certain gems in my Gemfile within
  and 'if statement' to prevent heroku from installing them as I only
  want them on my dev box.  The error only seems to happen in apps that
  I've used this technique.  Perhaps this is the source of these
  problems?

  When will Heroku start requiring you to add a Gemfile.lock and what
  are the best ways of preventing this problem?



-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



You have modified your Gemfile in development but did not check the resulting snapshot (Gemfile.lock) into version control

2010-10-11 Thread stephen murdoch
I get this error message every now and then:

You have modified your Gemfile in development but did not check the
resulting snapshot (Gemfile.lock) into version control

Most people suggest removing the .bundle directory and running bundle
install again making sure to add Gemfile.lock to the git repo before
committing and pushing to heroku but that doesn't always resolve the
problem.

The easiest way to fix this is by removing Gemfile.lock and pushing to
heroku without it.  Heroku then bundles your gems for you, but informs
you that you will soon be required to include a Gemfile.lock.

I am trying to get my head round this problem.

Can anyone tell my why this happens?

I have on occasions tried wrapping certain gems in my Gemfile within
and 'if statement' to prevent heroku from installing them as I only
want them on my dev box.  The error only seems to happen in apps that
I've used this technique.  Perhaps this is the source of these
problems?

When will Heroku start requiring you to add a Gemfile.lock and what
are the best ways of preventing this problem?

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.