From: Jon Forums Date: 2011-08-23T23:53:43+09:00 Subject: Re: unable to install rdiscount Arti Singh wrote in post #1017945: > I got the error below despite when installing rdiscount having devkit > inatalled and the > config.yamil pointing to the root of the ruby directory. I tried > installing it in jruby as well as ruby > Does anyone know any work arounds that i can try? I'm guessing you found my JRuby + C extensions post at http://jonforums.github.com/ruby/2010/11/30/devkit-jruby-c-extensions.html and tried the quick smoke test with rdiscount. More importantly, do you _really_ need to use rdiscount with JRuby for your markdown support? If not, check out whether pure Ruby gems like http://rubygems.org/gems/maruku or http://rubygems.org/gems/kramdown work for you. Bottom line: save yourself time and move on to more interesting things by using a pure Ruby gem like... C:\>jruby -rubygems -e "require 'kramdown';puts Kramdown::Document.new('**Hello JRuby**').to_html"

Hello JRuby

Still here? Beasties lie below with the result that JRuby + rdiscount no longer works for me. Still here?!?? It's difficult for people to tell what the problem is because you didn't provide enough information. In the future, please provide details such as the Windows OS version (eg - Win7, 32bit or 64bit, etc), the output from running `jgem env`, your DevKit `config.yml` file, etc. That said, I suspect you've run into a few problems: > C:/selenium/jruby-1.6.3/bin/jruby.exe extconf.rb > WARNING: JRuby does not support native extensions or the `mkmf' library > very well. > Check http://kenai.com/projects/jruby/pages/Home for alternatives. It appears you didn't install the DevKit (a 32bit toolchain) artifacts into your JRuby. After editing your config.yml file, you need to run `ruby dk.rb install` (you may need to run `jruby dk.rb install). For reference my config.yml contains this at the bottom; it's important to use forward-slashes. # Example: # # --- # - C:/ruby19trunk # - C:/ruby192dev # --- - C:/ruby19trunk - C:/ruby193 - C:/ruby192 - C:/ruby187 - C:/jruby - C:/Users/Jon/Documents/JavaDev/jruby-git > checking for random()... no > checking for srandom()... no > checking for rand()... > make > gcc -I. -I. -IC:/selenium/jruby-1.6.3/lib/native/include/ruby -I. > -DHAVE_RAND -D > HAVE_SRAND -fno-omit-frame-pointer -fno-strict-aliasing > -fexceptions > -m64 -march=native -mtune=native -c basename.c > basename.c:1:0: sorry, unimplemented: 64-bit mode not compiled in > make: *** [basename.o] Error 1 You're running Windows 64bit? What version? In my JRuby 1.6.3 download (jruby-bin-1.6.3.tar.gz) I only see the 32bit version of the DLL (lib/native/i386-Windows/jruby-cext.dll) required for interfacing with native C extensions, but no 64bit version in lib/native/x86_64-Windows. Even if there was a 64bit jruby-cext.dll version, I think you'll run into problems as the only DevKit we currently make available is a 32bit version. But if you're running a 32bit Windows, here's what I did to install rdisount on my Win7 Ultimate 32bit after installing the DevKit artifacts into my JRuby: C:\DevKit>jruby --version jruby 1.6.3 (ruby-1.8.7-p330) (2011-07-07 965162f) (Java HotSpot(TM) Client VM 1.7.0) [Windows 7-x86-java] C:\DevKit>gem --version 1.8.8 C:\DevKit>gem list rdiscount *** LOCAL GEMS *** C:\DevKit>gem install rdiscount Fetching: rdiscount-1.6.8.gem (100%) Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... Successfully installed rdiscount-1.6.8 1 gem installed But something's changed and it doesn't seem to work anymore :( C:\>jruby -rubygems -e "require 'rdiscount'; puts RDiscount.new('**Hello JRuby**').to_html" LoadError: load error: rdiscount -- java.lang.UnsatisfiedLinkError: failed to load shim library, error: The operation completed successfully. require at org/jruby/RubyKernel.java:1038 require at C:/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36 (root) at C:/jruby/lib/ruby/gems/1.8/gems/rdiscount-1.6.8/lib/rdiscount.rb:96 require at org/jruby/RubyKernel.java:1038 require at C:/jruby/lib/ruby/gems/1.8/gems/rdiscount-1.6.8/lib/rdiscount.rb:59 (root) at -e:1 If you've reached this point and are still interested, I suggest you take this issue over to the JRuby list at https://github.com/jruby/jruby/wiki/MailingLists Good luck! Jon --- blog: http://jonforums.github.com/ twitter: @jonforums "Anyone who can only think of one way to spell a word obviously lacks imagination." - Mark Twain -- Posted via http://www.ruby-forum.com/.