Thanks for replying, Frederick. So help me understand this: javascript-runtime is actually the javascript interpreter. Right? But what is odd is when I install node-js this solves my problem. And I thought node-js *was* written in javascript. Therefore, it itself requires an interpreter. Did I get this wrong? So how does installing node-js, a javascript script, solve the problem of not having a javascript interpreter to begin with?
Thanks again. On Thursday, April 4, 2013 5:39:43 AM UTC-7, Frederick Cheung wrote: > > > > On Thursday, April 4, 2013 1:14:01 PM UTC+1, Peter wrote: >> >> Hello Everyone, >> >> Can anyone please describe the relationship of javascript-runtime to Ruby >> on Rails? In Mac OSX, I do not get this error, but in Linux for every new >> project generated by "rails new", I get: >> >>> play$ rails s >>> >>> //.rvm/gems/ruby-2.0.0-p0/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in >>>> `autodetect': Could not find a JavaScript runtime. See >>>> https://github.com/sstephenson/execjs for a list of available runtimes. >>> >>> >> I know the solution; either install therubyracer or nodejs gems. But I am >> not sure I understand fully *why* it works. If I install this in a >> production environment server, I do not need either one of these. And my >> browser definitely interprets javascript built in. So how does this fit in >> to everything? Is my premise incorrect? Thank you. >> > > There are asset pipeline dependencies here: for example uglifyjs (for > minifying javascript) and coffeescript are both written in javascript. Both > of these two things happen serverside (almost: you can compile the assets > somewhere other than your deployment machines, and copy the finished > product either to the deployment machines or to the CDN of your choice) > > Fred > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/MhmcXGWzJDQJ. For more options, visit https://groups.google.com/groups/opt_out.

