Installing bcrypt-ruby gem on Windows

后端 未结 7 2157
夕颜
夕颜 2020-12-29 16:07

I\'m trying to install bcrypt-ruby on Windows Vista.

So far, I have been able to install nmake.exe from a MS knowledge base article and cl.exe from installing Visual

相关标签:
7条回答
  • 2020-12-29 16:26

    Try below command

    gem install bcrypt-ruby --platform=mswin32

    0 讨论(0)
  • 2020-12-29 16:32

    The better, easiest way is to install the development kit:

    1. Download devkit-<version>.7z from here;
    2. unpack it in the Ruby directory (for instance, C:\Ruby, so that you'll have C:\Ruby\devkit;
    3. from command line, type: gem install bcrypt-ruby.
    0 讨论(0)
  • 2020-12-29 16:32

    To be able to build a gem extension for One-Click Installer (OCI) you need VC6. Mxing and matching different versions of newer Visual Studio will fail or will generate unknown errors during runtime.

    I would recommend avoid all these hassles and proceed with the successor of One-Click, which is called RubyInstaller.

    1. Download and install either 1.8.6 or 1.9.1 RC1 packages, announced at RubyForge
    2. Download the Development Kit, and unpack it on your Ruby installation
    3. Follow INSTALL.txt instructions to adjust the DevKit to the location you extracted it
    4. Proceed with gem install bcrypt-ruby, will work out of the box

    For more details about using other gems or Rails with this newer version, please see the tutorials section in our Wiki.

    Hope this helps.

    0 讨论(0)
  • 2020-12-29 16:33

    I met the same problem when installing devise in windows.

    maybe you could checkout this: http://github.com/oneclick/rubyinstaller/wiki/development-kit

    and giorgian is correct, pay attention here:

    1. ruby version: you must install the "ruby installer" version, but not .zip version or other version.

    2. unpack it in the Ruby directory (for instance, C:\Ruby, so that you'll have C:\Ruby\devkit;

    3. If you installed ruby from other setup file (which is not ruby-installer), you MUST remove it ,then install ruby with the ruby installer. don't simply overwrite it.

    4. no need to install VC6, it won't work with other ruby setup version(which is not ruby- installer) . if you installed it just for setup the ruby-gem, I suggest you remove it.

    5. no need to install MinGW , cause dev-kit is based on it.

    I spent almost 15 hours to solve this problem. and it's now time to say that "ruby-installer" + "dev kit" is our choise to build the native gem.

    0 讨论(0)
  • 2020-12-29 16:33

    For me, a part of the problem was in the fact that I had Ruby2.0.0 x64 installed (I'm running win8), which seemed to be incompatible with the gcc compiler I was using.

    I've removed my ruby installation, and installed ruby 1.9.3 together with Bundler, Rails and some other packages with the use railsInstaller (http://railsinstaller.org/) and I'm now able to install bcrypt-ruby :)

    0 讨论(0)
  • 2020-12-29 16:35

    For me, the following worked

    gem uni bcrypt-ruby
    gem i bcrypt-ruby --platform=ruby
    
    0 讨论(0)
提交回复
热议问题