Forum: Ruby on Rails Can not fix the 'can not find javascript runtime' issue

Posted by Ekin Han (Guest)
on 2012-07-20 04:19
(Received via mailing list)
Hi all,

I am using unbuntu 11.10 with ruby 1.9.3.

I installed ruby 1.9.3 via source code and installed rails 3.2x with the
gem command 'sudo gem install rails'

After new a project and run 'rails server', an error occured, it was 
'Can
not find javascript runtime'.

Then I searched google and try to fix this problem by installing
'therubyracer' gem.

But when I type 'rails server' the problem still orrcued.

Would you kindly tell me how can I fix this issue?

Thank you.

Eason
Posted by Rajesh Madanapalli (rajeshreddy)
on 2012-07-20 07:01
(Received via mailing list)
Hi,

  include these two gems

  gem 'execjs'
  gem 'therubyracer'

Regards,
Rajesh.
Posted by Mrrobinhood5 (Guest)
on 2012-07-20 07:04
(Received via mailing list)
Try installing nodejs :)

If on ubuntu type :
sudo apt-get install nodejs

Hope this helps
Posted by Ekin Han (Guest)
on 2012-07-20 12:37
(Received via mailing list)
Thank you very much, I think i should install nodejs to fix this issue

2012/7/20 Mrrobinhood5 <mrrobinhood5@gmail.com>
Posted by Norbert Melzer (Guest)
on 2012-07-20 19:18
(Received via mailing list)
I would prefer ruby racer gem over nodes! Nodejs is a dependency that 
you
eventually can't satisfy on your production environment, and or others
can't if this is a project meant to be released open source or even
selling.
Am 20.07.2012 12:36 schrieb "Ekin Han" <nbkhic007@gmail.com>:
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.