unable to install devise on windows using jruby
C:>jruby -S gem install devise Building native extensions. This could take a while... ERROR: Error installing devise: ERROR: Failed to build gem native extension.
c:/jruby-1.5.3/bin/jruby.exe extconf.rb
make 'make' is not recognized as an internal or external command, operable program or batch file.
Gem files will remain installed in c:/jruby-1.5.3/lib/ruby/gems/1.8/ gems/bcrypt-ruby-2.1.2 for inspection. Results logged to C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/bcrypt- ruby-2.1.2/ext/mri/gem_make.out
can we build native extension using jruby, just like in ruby using DevKit, somethig like in jruby in windows
I just figured this out, and I am so glad I did because I am using Devise for a production application that is being deployed to Tomcat, and bcrypt was causing me grief. ANYWAY, here's what you do:
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 ruby dk.rb init
config.yml
and make sure that both your jruby and ruby installations are listed. If not, ADD them. Save and close config.yml
after you're done. ruby dk.rb install
. This will install DevKit to all the ruby installations listed in your config.yml
. Most important of all, IT WILL ALSO INSTALL IT INTO YOUR JRUBY INSTALLATION! Once installation is done, give it a whirl 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!
bcrypt-ruby现在从3.0.1版本开始提供预构建的Java gem,因此您无需编译即可使用Rail 3.1来启动和运行。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.