`autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a l

I have installed

ruby 1.9.2p318 (2012-02-14 revision 34678) [i686-linux]
rails 3.2.2
gem 1.8.21

on ubuntu 10.04

when i created my first application and tried running it on server I
get the following error not sure how to proceed further…

/home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/execjs-1.3.0/lib/execjs/
runtimes.rb:50:in autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/execjs-1.3.0/lib/ execjs.rb:5:inmodule:ExecJS
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/execjs-1.3.0/lib/
execjs.rb:4:in <top (required)>' from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/coffee- script-2.2.0/lib/coffee_script.rb:1:inrequire’
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/coffee-
script-2.2.0/lib/coffee_script.rb:1:in <top (required)>' from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/coffee- script-2.2.0/lib/coffee-script.rb:1:inrequire’
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/coffee-
script-2.2.0/lib/coffee-script.rb:1:in <top (required)>' from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/coffee- rails-3.2.2/lib/coffee-rails.rb:1:inrequire’
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/coffee-
rails-3.2.2/lib/coffee-rails.rb:1:in <top (required)>' from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/bundler-1.1.3/lib/ bundler/runtime.rb:68:inrequire’
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/bundler-1.1.3/lib/
bundler/runtime.rb:68:in block (2 levels) in require' from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/bundler-1.1.3/lib/ bundler/runtime.rb:66:ineach’
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/bundler-1.1.3/lib/
bundler/runtime.rb:66:in block in require' from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/bundler-1.1.3/lib/ bundler/runtime.rb:55:ineach’
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/bundler-1.1.3/lib/
bundler/runtime.rb:55:in require' from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/bundler-1.1.3/lib/ bundler.rb:119:inrequire’
from /home/fakirbaba/mitin/railsprograms/firstapp/config/
application.rb:7:in <top (required)>' from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.2/ lib/rails/commands.rb:53:inrequire’
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.2/
lib/rails/commands.rb:53:in block in <top (required)>' from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.2/ lib/rails/commands.rb:50:intap’
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.2/
lib/rails/commands.rb:50:in <top (required)>' from script/rails:6:inrequire’
from script/rails:6:in `’

thanks

re installed gem
execjs (1.3.0)

Hi,

Install JavaScript runtime environment in your systems by using
following steps.

Add in Gemfile,

gem ‘execjs’
gem ‘therubyracer’

and run bundle install.

Rai M wrote in post #1053476:

I have installed

ruby 1.9.2p318 (2012-02-14 revision 34678) [i686-linux]
rails 3.2.2
gem 1.8.21

on ubuntu 10.04

when i created my first application and tried running it on server I
get the following error not sure how to proceed further…

/home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/execjs-1.3.0/lib/execjs/
runtimes.rb:50:in autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/execjs-1.3.0/lib/ execjs.rb:5:inmodule:ExecJS
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/execjs-1.3.0/lib/
execjs.rb:4:in <top (required)>' from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/coffee- script-2.2.0/lib/coffee_script.rb:1:inrequire’
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/coffee-
script-2.2.0/lib/coffee_script.rb:1:in <top (required)>' from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/coffee- script-2.2.0/lib/coffee-script.rb:1:inrequire’
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/coffee-
script-2.2.0/lib/coffee-script.rb:1:in <top (required)>' from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/coffee- rails-3.2.2/lib/coffee-rails.rb:1:inrequire’
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/coffee-
rails-3.2.2/lib/coffee-rails.rb:1:in <top (required)>' from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/bundler-1.1.3/lib/ bundler/runtime.rb:68:inrequire’
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/bundler-1.1.3/lib/
bundler/runtime.rb:68:in block (2 levels) in require' from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/bundler-1.1.3/lib/ bundler/runtime.rb:66:ineach’
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/bundler-1.1.3/lib/
bundler/runtime.rb:66:in block in require' from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/bundler-1.1.3/lib/ bundler/runtime.rb:55:ineach’
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/bundler-1.1.3/lib/
bundler/runtime.rb:55:in require' from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/bundler-1.1.3/lib/ bundler.rb:119:inrequire’
from /home/fakirbaba/mitin/railsprograms/firstapp/config/
application.rb:7:in <top (required)>' from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.2/ lib/rails/commands.rb:53:inrequire’
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.2/
lib/rails/commands.rb:53:in block in <top (required)>' from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.2/ lib/rails/commands.rb:50:intap’
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.2/
lib/rails/commands.rb:50:in <top (required)>' from script/rails:6:inrequire’
from script/rails:6:in `’

thanks

On 27 March 2012 07:13, Rai M [email protected] wrote:

re installed gem
execjs (1.3.0)

So has that fixed it? Not much point telling us you have re-installed
unless you tell us what the outcome was.

Colin

on ubuntu 10.04
/home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/execjs-1.3.0/lib/
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/coffee-
bundler/runtime.rb:68:in `block (2 levels) in require’
/home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/bundler-1.1.3/lib/
from /home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.2/
You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


gplus.to/clanlaw

no the problem is still same…

add gem therubyracer in your gemfile,then check it.
for ubantu users it gives problem while fir window there is no such
problem.

regards
chitrank

I faced same issues. add these gem in assets group

gem ‘uglifier’
gem ‘therubyracer’

then run bundle install.

It works for me.

include this gem too in gem file and run bunlde install

gem ‘execjs’

sudo apt-get install nodejs
worked for me

unknown wrote in post #1096534:

sudo apt-get install nodejs
worked for me

Thanks , this worked for me and rails server is now up and running.

unknown wrote in post #1096534:

sudo apt-get install nodejs
worked for me

Thanks , this worked for me and rails server is now up and running.