2016-10-30 2 views
0

내가 Heroku가에 레일 5 응용 프로그램을 추진하려고하고 나는 내가 Heroku가 페이지의 지침에 따라 믿고 다음 오류와 함께 종료 https://devcenter.heroku.com/articles/ruby-versions에게 Heroku 버전에도 불구하고 설정되어 있지 가이드

$ ruby --version 
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu] 

$ cat Gemfile 
..... 
ruby "2.3.1" 

$ heroku run bash 
$ env | grep PATH 
PATH=/app/bin:/usr/local/bin:/usr/bin:/bin 

$ git push heroku master 
remote: Compressing source files... done. 
remote: Building source: 
remote: 
remote: -----> Ruby app detected 
remote: -----> Compiling Ruby/Rails 
remote: -----> Using Ruby version: ruby-2.2.4 

을 :

remote: -----> Preparing app for Rails asset pipeline 
remote:  Running: rake assets:precompile 
remote:  rake aborted! 
remote:  NoMethodError: undefined method `symbolize_keys' for #  <String:0x007fac0655feb0> 
remote:   /tmp/build_39bfaebc9acd5a6bcb91a69f2b13c171/vendor/bundle/ruby/2.2.0/gems /railties-5.0.0.1/lib/rails/application.rb:393:in `secrets' 

2.2가 아닌 2.3을 사용하고있는 것 같습니다.

/bin의 버전은 1.9.3이므로 찾을 수 없으면 2.2.3이 아닌 1.9.3을 사용해야합니다.

위의 오류 메시지는 spickermann을 사용하여 수정되었습니다. git 추적에서 secret.yml 파일을 제거하면 앱을 오류없이 배포 할 수있었습니다.

아직도 잘못된 루비 버전은 지속되고 Heroku가도 마지막에 경고를 반환

remote: ###### WARNING: 
remote:  You have not declared a Ruby version in your Gemfile. 
remote:  To set your Ruby version add this line to your Gemfile: 
remote:  ruby '2.2.4' 
remote:  # See https://devcenter.heroku.com/articles/ruby-  versions for more information. 

할 수있는 다른 일에 대해 어떤 조언을?

감사합니다.

+0

빈/번들이 가이드에 명시된 바를 잊어 버렸습니다. – shaolintl

+0

$ bundler --version 번들러 버전 1.13.6 – shaolintl

답변

0

config/secret.yml이 예상 된 형식이 아니기 때문에 배포에 실패했습니다. 그것은 생산 환경에서이 같은 중첩 된 해시를 기대 :

production: 
    secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> 

귀하의 config/secrets.ymlproduction에 대한 문자열을 반환합니다. 따라서 배포가 실패하고 새 버전을 배포 할 수 없었습니다.

+0

고맙습니다. 당신의 제안에 따라, 나는 그 문제가 실제로 secret.yml 파일과 관련이 있음을 발견했다. 이유는 조금 다릅니다. 형식은 괜찮 았지만 git에서 추적해서는 안됩니다. 명백하게, 자식에 의해 추적되는 secret.yml은이 오류를 일으킬 수 있습니다. 여전히 루비 버전은 2.2.4입니다. 나는 심지어 나의 Gemfile이이 문자열을 포함해야한다는 경고를 얻는다. 2.3.1을 포함합니다. Gemfile이 무시 될 수 있습니까? – shaolintl

+0

그 문자열은 어디에 있습니까? 'source' 정의 바로 아래 두 번째 줄의 맨 위? – spickermann

관련 문제