ruby - Unable to update gems on production server -
can not update gems on production server.
i've tried bundle install --deployment
, bundle install --without development test
but keep getting:
you trying install in deployment mode after changing gemfile. run `bundle install` elsewhere , add updated gemfile.lock version control. if development machine, remove gemfile freeze running `bundle install --no-deployment
edit
i don't know if correct, needed quick fix. ran bundle install --no-deployment
bundle update
ran bundle install --deployment
again
the instructions bit confusing. it's saying you've modified gemfile
on development machine , pushed changes rather running bundle install
before committing changes.
by running bundle install
update gemfile.lock
file. should pushed server it's more important gemfile
. consider gemfile
plans gemfile.lock
file.
always remember to:
- run
bundle install
if changegemfile
, make sure. if it's slow, pass--local
through forces use local gems resolve dependencies. - commit both
gemfile
,gemfile.lock
file repository - deploy both
gemfile
,gemfile.lock
production servers ensure they're running exact same dependencies development environment.
running bundle update
can construed dangerous update all dependencies of application. it's dangerous if don't have solid version numbers specified in gemfile
. wrote here.
Comments
Post a Comment