N5ken's technical blog

Just another WordPress.com site

Could not find a JavaScript runtime error in rails 3.1

If you are trying out the latest release of rails 3.1, you might encounter a problem that quotes:

Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.

I think this problem will makes the beginner confuse, or it should provides a more explicit message or instruction.

After spending a few minutes searching on the web, I found that you can fix this problem by simply adding gem ‘therubyracer’ into your Gemfile (it’s for Ruby MRI).

gem 'therubyracer

And that’s all folks, enjoy rails 3.1 which integrates jquery, scss, coffeescript, and lots more.. by default :)

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: