问题
I don't know what the heck is going on here, I just updated my rails from 3.1.0rc4 to 3.1.0 and I suddenly find that all ajax won't work, It's causing 406 error all the time. Everything was perfectly fine before I update to 3.1.0
Guys, I am going to lose controll now, help me.
回答1:
Make sure that you're setting the correct content-type and that your controllers respond to the specified format. This often happens if the request content-type is set to 'application/json' and your controller doesn't have either respond_to :json declared or a format.json response in your action.
来源:https://stackoverflow.com/questions/7808051/rails-completed-406-not-acceptable