"rake heroku:deploy"에서 Mongoid를 사용할 때 "rake db:migrate"를 건너뜁니다.
묘사
rake db:migrate
Mongoid에서 실제로 아무런 조작도 하지 않았기 때문에 heroku_san
를 사용하여 배치하면 문제가 발생할 수 있습니다.이로 인해 deploy
작업은 영원히 종료되지 않고 연속 순환에서 실행됩니다.코드는gem규범에Mongoid가 포함되어 있는지 확인하고 rake db:migrate
토론 #1
호출을 건너뛰는 것입니다. "배치 정책"의 발행 설명을 참고하십시오. 이 작업을 스스로 완성할 수 있습니다.코드 변경 사항이 없습니다, 지금!
승낙하다
2012년 7월 3일 화요일 오후 6:06, 짐 앤더스<
[email protected]
감사합니다!나는 서류를 열람할 때 반드시 이 점을 소홀히 했다.
내 아이폰에서 보내기
2012년 7월 3일 오후 6:09, Ken Mayer
[email protected]
쓰기:
wrote:
As
rake db:migrate
does not actually perform any action within Mongoid, this becomes problematic usingheroku_san
for deployments. This causes thedeploy
task to never exit, and run in a continuous loop. The code simply checks if the gem specification includes Mongoid, and skips the call torake db:migrate
You can merge this Pull Request by running:
git pull https://github.com/janders223/heroku_san master
Or you can view, comment on it, or merge it online at:
https://github.com/fastestforward/heroku_san/pull/102
-- Commit Summary -- - Add check in deploy for mongoid. If it exists skip running rake db:migrate - Modify deploy/rails.rb. Add conditional check when using Mongoid for ORM. If running mongoid, skip running rake db:migrate as it will not exit.
-- File Changes --
M .gitignore (2) M lib/heroku_san/deploy/rails.rb (8)
-- Patch Links --
https://github.com/fastestforward/heroku_san/pull/102.patch https://github.com/fastestforward/heroku_san/pull/102.diff
Reply to this email directly or view it on GitHub: https://github.com/fastestforward/heroku_san/pull/102
이 e-메일에 직접 회신하거나 GitHub에서 보려면 다음과 같이 하십시오.
https://github.com/fastestforward/heroku_san/pull/102#issuecomment-6747934
토론 #2
이것은 새것이어서 광고하기가 매우 어렵다.2012년 7월 3일 화요일 오후 6:10, 짐 앤더스<
[email protected]
See the release notes about "deploy strategies" You can do this yourself without any code changes, now!
Ken
On Tue, Jul 3, 2012 at 6:06 PM, Jim Anders < [email protected]
wrote:
As
rake db:migrate
does not actually perform any action within Mongoid, this becomes problematic usingheroku_san
for deployments. This causes thedeploy
task to never exit, and run in a continuous loop. The code simply checks if the gem specification includes Mongoid, and skips the call torake db:migrate
You can merge this Pull Request by running:
git pull https://github.com/janders223/heroku_san master
Or you can view, comment on it, or merge it online at:
https://github.com/fastestforward/heroku_san/pull/102
-- Commit Summary -- - Add check in deploy for mongoid. If it exists skip running rake db:migrate - Modify deploy/rails.rb. Add conditional check when using Mongoid for ORM. If running mongoid, skip running rake db:migrate as it will not exit.
-- File Changes --
M .gitignore (2) M lib/heroku_san/deploy/rails.rb (8)
-- Patch Links --
https://github.com/fastestforward/heroku_san/pull/102.patch https://github.com/fastestforward/heroku_san/pull/102.diff
Reply to this email directly or view it on GitHub: https://github.com/fastestforward/heroku_san/pull/102
이 e-메일에 직접 회신하거나 GitHub에서 보려면 다음과 같이 하십시오.
https://github.com/fastestforward/heroku_san/pull/102#issuecomment-6747934
이 e-메일에 직접 회신하거나 GitHub에서 보려면 다음과 같이 하십시오.
https://github.com/fastestforward/heroku_san/pull/102#issuecomment-6747968나는 좀 곤혹스러웠다. 나는 Mongoid를 사용하고 있었다. 나는 확실히 이전을 실행하고 싶었다.명령줄에서
토론 #셋
토론 #4
를 실행할 때, 명령줄이 정확하게 실행되고 되돌아옵니다.
단, @janders223에서 언급한 바와 같이,heroku san을 통해 실행할 때, 배치 작업은 영원히 완성되지 않습니다.
나는 자신의 전략을 정의해 보았다.그러나 그것은 무한한 배치 순환에 들어갔다.class CustomStrategy < HerokuSan::Deploy::Base def deploy @stage.push(@commit, @force) sh "heroku run rake db:migrate --app #{@stage.app} && heroku restart --app #{@stage.app}" end end
내가 뭘 잘못했는지 생각해 본 적 있어?
Reference
이 문제에 관하여("rake heroku:deploy"에서 Mongoid를 사용할 때 "rake db:migrate"를 건너뜁니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://github.com/jqr/heroku_san/issues/102텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)