I’ve jest spent a few hours resolving a problem with heroku. It occurred in the following line:
if @user.encrypt_password (params[:user][:old_password]) == @user.encrypted_password || (current_user.can?(:edit_user) && @user.status != 0)
And it worked after a really slight modification:
if @user.encrypt_password(params[:user][:old_password]) == @user.encrypted_password || (current_user.can?(:edit_user) && @user.status != 0)
After ‘if @user.encrypt_password’ at first I put a ‘space’ by accident. On my local machine it worked fine, but on heroku it resulted in a nasty error:
We’re sorry, but something went wrong.
We’ve been notified about this issue and we’ll take a look at it
shortly.
I checked everything twice, this definitely is the problem. What was that? Different versions of ruby? I really have no idea… If I can’t get any info from heroku, than it would be nice to at least have the same errors on my local machine so I could read them…
Does anybody have any ideas?
Bye
I’m not entirely sure, but it was probably a parser error. With the space there, it ended up taking everything that followed as the argument, I imagine.