2012-08-30 2 views
1

나는 Heroku에 밀고있는 상승 응용 프로그램이 있습니다. 다음 튜토리얼을 따라 프로젝트를 설정했습니다. - http://blog.heroku.com/archives/2011/10/3/scala/응용 프로그램을 heroku에 푸시하는 중 오류가 발생했습니다. - 클래스/객체가 이미 정의되어 있습니다.

I가 git push heroku master 명령과 모든 종속성이 다운로드 한 않을 때, 나는 다음과 같은 오류 얻을 :

info] Done updating. 
     [info] Compiling 34 Scala sources to /tmp/build_3mu8dl4lcbqoj/target/scala-2.9.1/classes... 
     [error] /tmp/build_3mu8dl4lcbqoj/src/main/scala/code/models/Model.scala:97: CardAttribute is already defined as class CardAttribute 
     [error] class CardAttribute extends MongoRecord[CardAttribute] 
     [error]  ^

이 프로젝트는 잘 로컬 그래서 잘 모르겠어요 컴파일을하는 이유는 말의 클래스/객체 이미 존재합니다. 이것은 영웅이 프로젝트를 업로드하는 방식과 관련이 있습니까? 프로젝트 캐시가 문제의 원인 일 수 있습니까?

+0

그래서 'sbt clean stage'를 실행하면 로컬에서 작동합니까? –

답변

0

조금 늦었지만 다른 사람에게 도움이 될 수 있습니다.

동일한 문제가 발생하여 코드를 리팩토링하고 패키지 이름을 변경 한 다음 Heroku로 푸시하려고 시도했지만 중복 객체로 인해 실패했습니다. 내 실수는 내가 내 자식 버전에서 삭제 된 파일을 무시 git add .를 사용하는 것을이었다

warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal', whose behaviour will change in Git 2.0 with respect to paths you removed.

Paths like 'app/.DS_Store' that are removed from your working tree are ignored with this version of Git.

  • 'git add --ignore-removal ', which is the current default, ignores paths you removed from your working tree.

  • 'git add --all ' will let you also record the removals.

Run 'git status' to check the paths you removed from your working tree.

솔루션은 Heroku가이 자식 측 git add . -A && git commit -m "message" && git push heroku master에 다음 heroku config:set SBT_CLEAN=true으로 청소하도록 설정하는 것이 었습니다.

관련 문제