开发者

Any javascript runtime for rails for SPARC Solaris 10?

I am trying to get rails running on a solaris 10 machine (SPARC). I have got ruby and rails installed and was able t开发者_Go百科o 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?


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.


Mozilla Rhino should work on SPARC.


$ 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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜