postgres 데이터베이스로 구성된 heroku에 내 레일 3.2.12 앱을 푸시하려고합니다. 내가 처음 실행했을 때 git push heroku master
아래 오류가 나타났습니다. heroku에 푸시하지 못했습니다.
Running: rake assets:precompile
rake aborted!
could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
은 몇 가지 문제 해결 후 나는
this 포스트를 가로 질러 와서 내
config/application.rb
파일에 다음 줄을 넣어 : 나는 다음 Heroku가 데이터베이스를 채우기 시작
heroku run rake db:migrate
를 실행
config.assets.initialize_on_precompile = false
다음과 같은 오류 접수 :
를Running rake db:create attached to terminal... up, run.4115
rake aborted!
undefined local variable or method `config' for main:Object
/app/config/application.rb:5:in `<top (required)>'
/app/Rakefile:5:in `require'
/app/Rakefile:5:in `<top (required)>'
재미있는 점은 application.rb의 5 행이 이전에 내가 추가 한 행이었습니다.
,451,515,config.assets.initialize_on_precompile = false
마지막으로, 나는 내 application.rb 파일에 위의 라인과 로컬 데이터베이스를 시작할 수없는 것으로 나타났습니다 - 나는 다음과 같은 오류가 나타납니다
config/application.rb:5:in `<top (required)>': undefined local variable or method `config' for main:Object (NameError)
이 문제는 캐치 (22)처럼 보인다을 application.rb 파일을 변경하지 않고 내 로컬 서버에서 heroku를 실행하는 방법은 무엇입니까?
올바른 장소에'config.assets.initialize_on_precompile = false'을 추가 했습니까? 'conf '뒤에이 행을 이동하여 확인할 수 있습니다.'application.rb에서 –
mohamagdy
'require File.expand_path ('../ boot', __FILE __)'및'require 'rails/all'' 바로 뒤에있었습니다 – Anconia