1

I am trying to get rails running on a solaris 10 machine (SPARC). I have got ruby and rails installed and was able to create a new project. When I try to start the rail server, I get:

/export/home/eseifert/lib/ruby/gems/1.9.1/gems/execjs-1.2.9/lib/execjs/runtimes.rb:47:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

I have ran into this before on my linux machine, so I went to install therubyracer, which did not work and then tried node.js, which also does not work. It seems these do not support SPARC. Does any one know of a javascript runtime that will work on a SPARC machine?

Eric Seifert
  • 1,946
  • 2
  • 17
  • 31
  • Well I was able to get the WEBRick server started by commenting out the coffee-script and uglifier gems in the Gemfile, removign the need for a js runtime. See: [link](http://stackoverflow.com/questions/6075961/problem-deploying-rails-3-1-project-to-heroku-could-not-find-a-javascript-runtim). Can anyone tell me exactly what I am loosing without the javascript runtime? – Eric Seifert Oct 05 '11 at 18:18

3 Answers3

1

Coffee-script is new in rails 3.1 compiles .coffee files into .js files. If your app is not using coffeescript, you won't lose anything because you can write just plain javascript. Many people continue to do this even though 3.1 is out.

If you really want to play around with coffee-script (or need it), you'll need to build a javascript runtime yourself or get a Solaris 10 binary. I didn't have much luck finding a binary. You may have to do the usual "install the GNU tools" and then grab the spidermonkey or node.js source. Note that this list is not exhaustive. From the runtimes.rb file: RubyRacer, RubyRhino, Johnson, Mustang, Node, JavaScriptCore (Mac), SpiderMonkey and JScript (Windows) are valid runtimes.

Getting node.js to work probably is not too hard. But you have to have all the GNU tools installed (like gcc etc). There are a few guides already out there on how to do that. It involves lots of downloading from sunfreeware.com etc. If this is going to be a development box to learn rails on, you'll most likely need them because many gems compile C code.

squarism
  • 3,242
  • 4
  • 26
  • 35
  • Thanks squarism, I have all of the gnu tools installed and compiled most everything from scratch anyway, and so I did try to compile node.js as well as v8, but I believe that unfortunately they don't currently support SPARC architecture. It does not sound like a big deal for me, so I will live without it. – Eric Seifert Oct 05 '11 at 20:23
0

Mozilla Rhino should work on SPARC.

-1
$ wget http://nodejs.org/dist/node-v0.4.12.tar.gz
$ tar xvzf node-v0.4.12.tar.gz
$ ./configure
$ make
$ make doc
$ sudo make install
user583726
  • 647
  • 2
  • 9
  • 20