2

I have a Sinatra app that is located here https://github.com/trivektor/Backbone-Hangman. The first time I push it to Heroku, everything worked fine. However, on the second push my application crashed. The only thing that I changed was CSS. Checking the logs, I found the message

Unexpected error while processing request: can't convert nil into String

Does anyone know why this is happening? Thanks.

trivektor
  • 5,608
  • 9
  • 37
  • 53

3 Answers3

1

Sometime the lack of a closing } can cause this. Check those in all your css files and prescompile assets for production. RAILS_ENV=production bundle exec rake assets:precompileHere is some more details

Community
  • 1
  • 1
Yuri
  • 1,261
  • 1
  • 11
  • 23
1

I was getting the same error in a Sinatra app this week. Looking at the git repo provided by this questions author, I saw this commit. It fixed the issue I was having.

Marvin Pinto
  • 30,138
  • 7
  • 37
  • 54
Sean Dixon
  • 167
  • 1
  • 6
0

I had this issue using sinatra-activerecord. Updating my database and rebooting the environment did the trick for me:

rake db:migrate

jchook
  • 6,690
  • 5
  • 38
  • 40