My Rails App works perfect local and on my own linux root (with sqlite to test it)
After uploading it to heroku, i have a small problem.
Half of my requests does not work anymore.
All Requests with a ".where()" condition are broken.
Here is a small code snippet from my controller:
def GameModeB
ActiveRecord::Base.include_root_in_json = false
@highscore = Highscore.where("gamemode = \"b\"").order("points DESC").limit(100)
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @highscore }
format.json { render :json => @highscore}
end
end
This is my errorlog from heroku log
2011-12-07T12:21:08+00:00 app[web.1]: LINE 1: ...highscores".* FROM "highscores" WHERE (gamemode = "b") ORDER...
2011-12-07T12:21:08+00:00 app[web.1]: ^
2011-12-07T12:21:08+00:00 app[web.1]: : SELECT "highscores".* FROM "highscores" WHERE (gamemode = "b") ORDER BY points DESC LIMIT 100): 2
The Problem is where("gamemode = \"b\"")
So what is the correct statement and why does it not work on heroku this was ? thx
@highscore = Highscore.where(:gamemode => "b").order("points DESC").limit(100)