Reputation: 41
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
Upvotes: 4
Views: 2029
Reputation: 905
bcrypt-ruby now comes with pre-built java gems as of 3.0.1, so you won't need to compile your own to get up and running with Rail 3.1
Upvotes: 0
Reputation: 9456
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 DevKitruby 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!
Upvotes: 2