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. Peter -- 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 rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/T4-gAil4yQoJ. For more options, visit https://groups.google.com/groups/opt_out.
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 rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/uC2PPtH4k8UJ. For more options, visit https://groups.google.com/groups/opt_out.
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 rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
just a small add to the topic, node.js is not written in javascript.. it allows you to write your stuff, using javascript. http://en.wikipedia.org/wiki/Nodejs actually its very compatible with coffee script which is, in my opinion, way more fun than javascript ( : http://coffeescript.org/ On 5 April 2013 19:01, Peter <peter-I8Khkwz7QpbQT0dZR+AlfA@public.gmane.org> wrote:> 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<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 rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > 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. > > >-- 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 rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 5 April 2013 19:01, Peter <peter-I8Khkwz7QpbQT0dZR+AlfA@public.gmane.org> wrote:> 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?Node.js is based on the Google''s javascript engine, I believe, which is not written in javascript. With it comes a javascript library to extend the features (which is run by the javascript engine of course). Colin> > 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 rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > 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. > >-- 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 rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On Thu, Apr 4, 2013 at 8:14 PM, Peter <peter-I8Khkwz7QpbQT0dZR+AlfA@public.gmane.org> wrote:> I know the solution; either install therubyracer or nodejs gems. > >try, bundle install --without assets> 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? > >you are correct. kind regards -botp -- 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 rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On Friday, April 5, 2013 7:01:50 PM UTC+1, Peter wrote:> > 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? > > node-js is both both google V8 javascript engine plus some libraries (muchas for example ruby is the ruby interpreter plus a bunch of standard library stuff) 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 rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/Kalltx3NmnkJ. For more options, visit https://groups.google.com/groups/opt_out.
Thank you, everyone. This was an issue only in my Fedora laptop. In my OSX, not a problem at all. I knew all along that installing therubyracer or nodejs would fix this, I just didn''t know the "why" since I thought these weren''t javascript interpreters; that they themselves were written in javascript that required a javascript interpreter. That said, I installed therubyracer and I did see libv8 being installed along with it. This I believe is the javascript interpreter so it now makes sense and I understand that it is used only for compiling the assets in asset pipeline. Thanks again for everyone''s input. p On Sunday, April 7, 2013 3:35:04 AM UTC-7, Frederick Cheung wrote:> > > > On Friday, April 5, 2013 7:01:50 PM UTC+1, Peter wrote: >> >> 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? >> >> node-js is both both google V8 javascript engine plus some libraries > (much as for example ruby is the ruby interpreter plus a bunch of standard > library stuff) > > 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 rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/0fNqV41Nu98J. For more options, visit https://groups.google.com/groups/opt_out.
I hate to add to the confusion, but therubyracer is now not recommended on Heroku. What do you suggest we do ? I typically precompile assets and push it. Is this the recommended way? On Mon, Apr 8, 2013 at 7:08 AM, Peter <peter-I8Khkwz7QpbQT0dZR+AlfA@public.gmane.org> wrote:> Thank you, everyone. This was an issue only in my Fedora laptop. In my OSX, > not a problem at all. I knew all along that installing therubyracer or > nodejs would fix this, I just didn''t know the "why" since I thought these > weren''t javascript interpreters; that they themselves were written in > javascript that required a javascript interpreter. > > That said, I installed therubyracer and I did see libv8 being installed > along with it. This I believe is the javascript interpreter so it now makes > sense and I understand that it is used only for compiling the assets in > asset pipeline. Thanks again for everyone''s input. > > p > > > On Sunday, April 7, 2013 3:35:04 AM UTC-7, Frederick Cheung wrote: >> >> >> >> On Friday, April 5, 2013 7:01:50 PM UTC+1, Peter wrote: >>> >>> 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? >>> >> node-js is both both google V8 javascript engine plus some libraries (much >> as for example ruby is the ruby interpreter plus a bunch of standard library >> stuff) >> >> 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 rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-talk/-/0fNqV41Nu98J. > > For more options, visit https://groups.google.com/groups/opt_out. > >-- Best, Manish Chakravarty Blog | Twitter | LinkedIn -- 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 rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On Mon, Apr 8, 2013 at 10:29 AM, Manish Chakravarty <manishchaks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> I hate to add to the confusion, but therubyracer is now not > recommended on Heroku. > What do you suggest we do ? I typically precompile assets and push it. > Is this the recommended way? >https://devcenter.heroku.com/articles/rails-asset-pipeline -- 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 rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.