2016-11-02 6 views
0

일단 spree (3.1)가 로컬에서 작동하면 다음은 heroku로 푸시됩니다. 수동으로 유사한 레일 명령 중 하나를 사용하여 설치 테이블을한다. 을 document에서 내가ActiveRecord :: StatementInvalid (PG :: UndefinedTable : ERROR : 관계 "spree_orders"가 존재하지 않습니다.

rails g spree:install --user_class=Spree::User 
    rails g spree:auth:install 
    rails g spree_gateway:install 

내 첫 번째 질문을 실행하는 가정 내 솔루션은 이러한 명령을 사용

에게 Heroku를 위해 그 명령을 실행하는 방법입니다

heroku run rake spree:install --user_class=Spree::User 
    heroku run rake railties:install:migrations 
    heroku run rake db:migrate 
    heroku run rake db:seed 
    heroku run rake spree_sample:load 
+0

얹는? 헤로쿠에서 명령을 실행할 때 어떻게됩니까? 무슨 문제가있는 것 같습니까? – MarsAtomic

+0

그것은 ActiveRecord :: StatementInvalid 내 문제를 해결했습니다. 그러나 아무도 왜 영웅을 위해 해야할지 언급하지 않았는지 궁금해합니다. –

답변

0

heroku에서이 명령을 다시 실행할 필요는 없습니다.

gree에 의해 생성 된 파일을 git에 추가하기 만하면됩니다. gree에 자유로운 마이그레이션을 추가 한 다음 heroku에 배포 할 수도 있습니다.

그래서

heroku run rake db:migrate 
+0

좋아요, heroku addons를 실행 한 후 시도해 보았습니다. heroku-postgresql과 git push heroku master를 추가하여 배포를 마칩니다. Spree는 이제 샘플없이 바로 사용할 수 있습니까? –

관련 문제