Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Node.js not showing up as my default JavaScript Runtime after installing Rails environment on my computer.

This is my second computer I am installing Rails on so I know I did something wrong, but I was wondering if there was a configuration setting or command somewhere to make Node.js the default Javascript Runtime in rails? *Note I double checked to make sure I installed Node.js

4 Answers

Found my own resolution. For reference: it seems that the x64 bit version of Node.js is needed in a x64 system? I attempted to install x86 version and Node.js wasn't showing up as my javescript runtime in the "About your application's environment" report.

uninstalled 32 bit version and downloaded 64 bit installer, restarted browser and rails server and boom! Node.js!

Peter, I think there are some misconceptions here. Rails is used to developer web application, the Rails engine (as I know) does NOT run Javascript, it only generates the webpages for you. The webpages are then rendered by a browser (chrome, firefox, internet explorer, safari...). The browsers have their internal Javascript engine, which runs the generated Javascript code from the Rails framework.

You cannot change the Javascript engine in the browser.

Let me be more specific. After following this tutorial to install all of the different software needed in the rails environment, I created a testapp, ran my server, and navigated to localhost:3000. Once there I clicked on "About your application's environment". the following screen capture is the information that comes from there http://imgur.com/gwx9HaY . The video actually says to make sure that Node.js is the Javascript Runtime.

Below is the tutorial video for reference, and also I have attempted to uninstall and reinstall Node.js as well. http://teamtreehouse.com/library/installing-a-ruby-development-environment/installing-a-ruby-development-environment/installing-ruby-on-windows

Also thank you for the input/assistance!