[英]How to clone a gem, fix it, add it to repo, bundle, and deploy with Rails
我有一個 Rails 5 應用程序,它使用 gem,它不再在生產中工作。 我修復了它,嘗試按照以下配方將其添加到我的本地 Gemfile 中:
https://gist.github.com/zulhfreelancer/1d30bf77e9b26773a6b45c99fc0a4b0b
(但是這個食譜沒有提供如何將它添加到你的倉庫)。 所以,我嘗試了 git add -all'ing 到我的 vendor/gems 目錄中的 repo。 一切都很好,但是當我嘗試部署時,我得到:
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
我按照清理和重新捆綁的方法,同樣的錯誤。 為了使事情復雜化,我們使用 rvm,不確定這是一個問題,但只是添加了額外的信息。
所以一般來說,你如何修復別人的 gem 上的缺陷(repo 已關閉,所以我無法提交拉取請求,盡管我確實留下了問題),並通過將其添加到應用程序中使用本地修改的 gem您的倉庫並確保 capistrano 和 bundler 將在生產中使用您的本地資源?
謝謝,凱文
腳步
在 Github 上 fork 自己賬戶下的項目
進行您想要的更改
使用gem 'gem_name', git: 'your_forked_project', branch: 'the_branch_you_working_on'
運行bundle install
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.