Install newjs gem with JRuby doesn't works

4 views
Skip to first unread message

Babarocap

unread,
Aug 22, 2008, 4:02:27 AM8/22/08
to JavaScript Project Generator
When I run this command :
gem install newjs
I've this error :
Building native extensions. This could take a while...
ERROR: Error installing newjs:
ERROR: Failed to build gem native extension.

C:/Program Files/NetBeans 6.5 Beta/ruby2/jruby-1.1.3/bin/jruby.bat
extconf.rb in
stall newjs
C:/Program Files/NetBeans 6.5 Beta/ruby2/jruby-1.1.3/lib/ruby/1.8/
mkmf.rb:7: JRu
by does not support native extensions. Check wiki.jruby.org for
alternatives. (N
otImplementedError)
from C:/Program Files/NetBeans 6.5 Beta/ruby2/jruby-1.1.3/lib/
ruby/1.8/m
kmf.rb:1:in `require'
from extconf.rb:1


Gem files will remain installed in C:/Program Files/NetBeans 6.5 Beta/
ruby2/jrub
y-1.1.3/lib/ruby/gems/1.8/gems/RedCloth-4.0.3 for inspection.
Results logged to C:/Program Files/NetBeans 6.5 Beta/ruby2/jruby-1.1.3/
lib/ruby/
gems/1.8/gems/RedCloth-4.0.3/ext/redcloth_scan/gem_make.out

Dr Nic Williams

unread,
Aug 22, 2008, 4:12:32 AM8/22/08
to javascript-pro...@googlegroups.com
What is the most recent RedCloth gem for jruby?

Redcooth isn't a core dependency and could be removed as gem dep I
think.

Nic

Babarocap

unread,
Aug 22, 2008, 4:27:16 AM8/22/08
to JavaScript Project Generator
I think it's RedCloth 4.0.3 because I see it in my directory
jruby-1.1.3\lib\ruby\gems\1.8\gems\RedCloth-4.0.3 but when I do

C:\>gem search redcloth -b

*** LOCAL GEMS ***

*** REMOTE GEMS ***

RedCloth (4.0.3)


It's not in my Local Gems !?
And when I want to install it I've the same error than newjs

Babarocap

unread,
Aug 22, 2008, 4:44:25 AM8/22/08
to JavaScript Project Generator
Redcloth doesn't work with this script:

require 'rubygems'
require 'redcloth'

p RedCloth.new("abc foo abc").to_html

Here the error message :
C:\>jruby "C:\redcloth_test.rb"
C:/Program Files/NetBeans 6.5 Beta/ruby2/jruby-1.1.3/lib/ruby/
site_ruby/1.8/ruby
gems/custom_require.rb:27:in `require': no such file to load --
redcloth (LoadEr
ror)
from C:/Program Files/NetBeans 6.5 Beta/ruby2/jruby-1.1.3/lib/
ruby/site_
ruby/1.8/rubygems/custom_require.rb:27:in `require'
from C:\redcloth_test.rb:2

Maybe a JRuby's bug ? Or a problem with my config...

Nic Williams

unread,
Aug 22, 2008, 4:53:10 AM8/22/08
to javascript-pro...@googlegroups.com
jruby requires jruby specific gems, if the gem requires installing native extensions (e.g. C code); I guess there is no jruby version of RedCloth.
--
Dr Nic Williams
Fun with iPhone/Ruby/Rails/Javascript - http://drnicwilliams.com
* Learn TextMate for Rails2 - http://peepcode.com/products/textmate-for-rails-2 *

Babarocap

unread,
Aug 22, 2008, 6:34:39 AM8/22/08
to JavaScript Project Generator
I've download and install manually the Windows version of Redcloth
gem
gem install c:\RedCloth-4.0.3-x86-mswin32-60.gem

Redcloth didn't seem to work...
But I can successfully install newjs !
Now I'm going to test if newjs is working correctly.

.

Babarocap

unread,
Aug 22, 2008, 8:26:56 AM8/22/08
to JavaScript Project Generator
I've found the solution :
The last version of RedCloth isn't compatible with JRuby but the
RedCloth 3.0.x versions are OK.

So, to install correctly newjs on JRuby you have to do :
gem uninstall RedCloth -v 4.0.3
gem install RedCloth -v 3.0.4
gem install newjs

I think you can close this topic.

And like we say in French, Merci Docteur !

Nic Williams

unread,
Aug 22, 2008, 8:29:45 AM8/22/08
to javascript-pro...@googlegroups.com
Ok, so I shouldn't upgrade the required version of RedCloth in the dependencies. I think I did in newgem, not sure.

You might like to ping the new RedCloth maintainer and ask if they want to release a jruby version. They might not know how.
Reply all
Reply to author
Forward
0 new messages