我们有一个代码库,在旧代码库中用作gem。在部署之后,我们看到,gem中的旧代码正在执行。现在我们要手动更新服务器中的gem
这是capistrino正在做的事情
bundler:install
01 ~/.rvm/bin/rvm 2.3.0 do bundle install --path /home/deployer/bla/shared/bundle --without development test --deployment --quiet
01 Warning, new version of rvm available '1.28.0', you are using older version '1.27.0'.
01 You can disable this warning with: echo rvm_autoupdate_flag=0 >> ~/.rvmrc
01 You can enable auto-update with: echo rvm_autoupdate_flag=2 >> ~/.rvmrc
所以我进入了bundle文件夹而且我做了
bundle update gem_name
。
它说它找不到gemfile。并且bundle文件夹的内容只是ruby。有没有办法可以手动更新宝石?任何帮助将不胜感激。
答案 0 :(得分:0)
Bundler并没有这样做。即使你更新了gem,如果你的Gemfile / Gemfile.lock仍然引用旧版本,那就是要加载的版本。如果它不可用,那么您的应用无法启动。
如果要在生产环境中更新gem,则需要在Gemfile所在的app目录中运行bundle update gem_name
。假设您没有在Gemfile中选择过于特定的版本,这将修改您的Gemfile.lock并安装新的gem。