Jruby: - ​​Unable to install application on windows using jruby

failed to install program on windows using jruby

=================================================

C:> jruby -S gem install devise Create your own extensions. This may take some time ... ERROR: Error installing devise: ERROR: Failed to create native gem extension.

c: /jruby-1.5.3/bin/jruby.exe extconf.rb

make-up is not recognized as an internal or external command, operating program, or batch file.

Gem files will remain in c: /jruby-1.5.3/lib/ruby/gems/1.8/ gems / bcrypt-ruby-2.1.2 for verification. Results recorded in C: /jruby-1.5.3/lib/ruby/gems/1.8/gems/bcrypt- ruby ​​2.1.2 / int / MRI / gem_make.out

=================================================

you can build your own extension using jruby, like in ruby, using DevKit, somethig like in jruby on windows

+4
source share
2 answers

I just figured it out, and I'm so glad I did because I use Devise for a production application that is deployed to Tomcat, and bcrypt makes me sad. Anyway, here's what you do:

  • Make sure you are using the Ruby version from RubyInstaller
    • Download and install which version of Ruby you want.
    • I should mention that I am using Ruby 1.8.7 and have not tested this for Ruby 1.9 +
  • Download the latest version of DevKit as well as RubyInstaller .
    • Remove DevKit, but Do Not Install It At This Moment
  • Download and install JRuby
  • At this point, RubyInstaller Ruby and JRuby should be available in your path.
    • A simple check is to open a command prompt window and enter
      • jruby -v outputs jruby 1.5.5 (ruby 1.8.7 patchlevel 249) (2010-11-10 4bd4200) (Java HotSpot(TM) Client VM 1.6.0_21) [x86-java]
      • ruby -v outputs ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
  • cd to the directory where you extracted DevKit
  • Type ruby dk.rb init
  • IMPORTANT: Open config.yml and make sure both jruby and ruby ​​are specified. If not, ADD . Save and close config.yml after you are done.
  • Return to the command prompt window, enter ruby dk.rb install . This will install DevKit for all ruby ​​installations listed in your config.yml . Most importantly, THIS ALSO INSTALLS THIS IN YOUR JRUBY INSTALLATION!
  • After installation is complete, give it a whirlwind by typing jruby -S gem install bcrypt-jruby

     C:\>jruby -S gem install bcrypt-ruby --no-ri --no-rdoc JRuby limited openssl loaded. http://jruby.org/openssl gem install jruby-openssl for full support. Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... Successfully installed bcrypt-ruby-2.1.2 1 gem installed 

BINGO! BANGO!

+2
source

bcrypt-ruby now comes with pre-built java stones from version 3.0.1, so you won’t need to compile your own to get up and work with Rail 3.1

0
source

All Articles