2014-04-27 3 views
0

내 앱이 완벽하게 로컬에서 실행되고 있지만 Heroku를 방문한 후에 앱을 가져올 수 없습니다.Heroku + Rails : NoMethodError (nil : NilClass에 대해 정의되지 않은 메소드 '/')

여기 로그입니다

2014-04-27T21:56:42.590706+00:00 app[web.1]: Started GET "/" for 98.217.72.49 at 2014-04-27 21:56:42 +0000 
2014-04-27T21:56:42.593370+00:00 app[web.1]: Processing by FinancesController#index as HTML 
2014-04-27T21:56:42.593370+00:00 app[web.1]: Processing by FinancesController#index as HTML 
2014-04-27T21:56:42.621915+00:00 app[web.1]: Completed 500 Internal Server Error in 28ms 
2014-04-27T21:56:42.621915+00:00 app[web.1]: Completed 500 Internal Server Error in 28ms 
2014-04-27T21:56:42.623629+00:00 app[web.1]: 
2014-04-27T21:56:42.623629+00:00 app[web.1]: NoMethodError (undefined method `/' for nil:NilClass): 
2014-04-27T21:56:42.623629+00:00 app[web.1]: app/controllers/finances_controller.rb:103:in `retirementalgorithm' 

내가했던 Heroku가 레이크 DB : 마이그레이션하고 심지어 Heroku가 다시 시작. 영업 이익과 채팅 세션 당으로

+0

'finance_controller.rb'에서'retirementalgorithm' 메소드를 공유 할 수 있습니까? 줄 번호'103'처럼'something/other_thing'을'무언가가 무 (無) '라고 불렀습니다. 코드를 공유하면 핀 포인트를 지정할 수 있습니다. –

+0

@getcompanysponsored = Investment.where (user_id : current_user, investmenttype : [ '401k', '403b']) sum (: 기여) – beaconhill

+0

채팅에 대해 이야기 해 보겠습니다. http://chat.stackoverflow.com/rooms/48530/ ror –

답변

0

,

오류가 아래 줄에 있었다 :

@companysponsored = (finance.salary/12) * (@getcompanysponsored.to_f/100)* (@getcompanymatchupto.to_f/100) 

@getcompanymatchupto이 호출 후 설정되었다. 따라서, 그 값은 위에는 없습니다. 사용하기 전에 @getcompanymatchupto을 정의 할 것을 제안했습니다.

+0

도와 줘서 다행 :) –

관련 문제