Discontinue the med and call the vet.
I would take him to the vet for a blood panel (looking at liver enzymes in particular).
NSAIDs can be dangerous. There is a whole website dedicated to the deaths caused by this drug. I don't want to scare you but if it were Ellie, I would get bloodwork done just in case. I would also try Tramadol because Rimadyl because I like it better.
http://www.veterinarypartner.com/Con...C=31&A=623&S=0