Ask Your Question
0

Fedora 18 + Rails error

asked 2013-03-14 15:21:07 -0500

updated 2013-03-14 16:31:37 -0500

hhlp gravatar image

I keep trying to setup rail on my machine to run a development enviroment for rails but I keep on coming across the same error when I try to start the test server ("rails server"):

<code><br />
/home/crimson/.gem/ruby/1.9.1/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See //github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
    from /home/crimson/.gem/ruby/1.9.1/gems/execjs-1.4.0/lib/execjs.rb:5:in `<module:ExecJS>'
    from /home/crimson/.gem/ruby/1.9.1/gems/execjs-1.4.0/lib/execjs.rb:4:in `<top (required)>'
    from /home/crimson/.gem/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
    from /home/crimson/.gem/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `block in require'
    from /home/crimson/.gem/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /home/crimson/.gem/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
    from /home/crimson/.gem/ruby/1.9.1/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `<top (required)>'
    from /home/crimson/.gem/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
    from /home/crimson/.gem/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `block in require'
    from /home/crimson/.gem/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /home/crimson/.gem/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
    from /home/crimson/.gem/ruby/1.9.1/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `<top (required)>'
    from /home/crimson/.gem/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
    from /home/crimson/.gem/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `block in require'
    from /home/crimson/.gem/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /home/crimson/.gem/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
    from /home/crimson/.gem/ruby/1.9.1/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `<top (required)>'
    from /usr/share/gems/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in `require'
    from /usr/share/gems/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
    from /usr/share/gems/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in `each'
    from /usr/share/gems/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in `block in require'
    from /usr/share/gems/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `each'
    from /usr/share/gems/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `require'
    from ...
(more)
edit retag flag offensive close merge delete

Comments

It looks like a java problem. Do you have Java installed?

lnxslck gravatar imagelnxslck ( 2013-03-14 18:06:32 -0500 )edit

I doublechecked and reinstalled openjdk and not difference

mpenhall gravatar imagempenhall ( 2013-03-14 18:21:33 -0500 )edit

What does this file show: //github.com/sstephenson/execjs

lnxslck gravatar imagelnxslck ( 2013-03-14 18:58:01 -0500 )edit

it's a https:// link in the error report... had to edit since didn't have enough karma to post http links... I already looked on there and that's what told me to try installing therubyracer and/or node.js (or mozilla rhino which requires jruby, aka what I don't want to be running [I am running on ruby not jruby])

mpenhall gravatar imagempenhall ( 2013-03-14 23:10:08 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-03-22 04:59:21 -0500

slavek gravatar image

If you have already installed therubyracer, then you need to go to your app directory, edit Gemfile (uncomment the line with "gem 'therubyracer'") and run bundle install again. That should do the trick.

edit flag offensive delete link more
0

answered 2013-04-11 12:02:01 -0500

nebjak gravatar image

You should add to your Gemfile

gem "therubyracer", "~> 0.11.4"

or you can install node.js

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-03-14 15:21:07 -0500

Seen: 793 times

Last updated: Apr 11 '13