Let me repeat that. Rails 3.1 apps by default will NOT work in Linux, unless you have node.js installed. This is absolutely ridiculous... guess what Rails team, a lot of people are developing in Linux and not Mac. I understand how stuff not working in Windows is released, but Linux??
So to get things to work you'll need to add one of the gems listed on the execjs page. If you're running the MRI Ruby, just add:
to your Gemfile. I've read a lot of complaints about therubyracer. But it appears to be the most popular. If you're running JRuby like me, add:
to your Gemfile. I've verified that this works correctly.
FOLLOW UP 1/13/2012:
See my comments. I have made a fix to Rails to put the appropriate gem in the Gemfile if you are in Linux, and issued pull requests to the Rails core to incorporate this code. They have made some comments on it, hopefully it will be pulled in to Rails soon.