繁体   English   中英

如何在capstrino环境中手动更新gem

[英]How to manually update a gem in the capstrino environment

我们有一个代码库,在较旧的代码库中它被用作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。 有什么方法可以手动更新gem? 任何帮助将不胜感激。

Bundler不能那样工作。 即使您更新了gem,如果您的Gemfile / Gemfile.lock仍然引用旧版本,也将加载该旧版本。 如果不可用,则您的应用程序将无法启动。

如果要在生产环境中更新gem,则需要在bundle update gem_name所在的应用目录中运行bundle update gem_name 假设您没有在Gemfile中选择过于特定的版本,这将修改Gemfile.lock并安装新的gem。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM