install bcrypt-ruby on windows - bcrypt

I have copy the make.bat to bin\ folder,when run the command gem install bcrypt-ruby,
it shows the bash.exe is not the internal or external command.
How to solve it?

I was trying to install "bcrypt-ruby" on Windows 8, 64 bit .
Tried a lot of configurations, ranging from different versions of the gem, direct from git, platform ruby etc.
But nothing worked
At the end installed DEVKIT compatible to my ruby version and thats it.
Steps
Install Devkit compatible to your ruby version
Link : http://rubyinstaller.org/downloads/
Download under
C:/Ruby Folder/devkit
Then on command line go to above path
C:/Ruby Folder/devkit
then say
gem install bcrypt-ruby
This should install it,
Post this, you need to add the gem to your Gemfile and say
bundle install
bundle update
bundle install
This should work fine. Also solves update issues related to active_record etc.
The same should work for WIN 64, WIN 32 also.

Related

Installing gem-bundle for Redmine 2.1.4 with Ruby 1.9.3 (including rmagick 2.13.1) on Windows

I'm having problems installing json or rmagick gems on Windows, which I need because I am trying to install Redmine 2.1.4.
As none of the procedures worked out-of-the-box for me and have struggled with it myself for a couple of hours, I thought I'd just ask here for help.
I'm assuming you don't have Ruby installed yet. If you do, as any of other components mentioned below, probably it's the wisest to uninstall them before proceeding with installation.
This tutorial should help you avoid problems with json and rmagick gems on Windows.
First, download Redmine 2.1.4 from rubyforge as zip or from SVN or Git as described on the relevant Redmine Wiki page. rubyforge tends not to work, so you can be forced to use the latter.
Download RubyInstaller (1.9.3 at the time of this writing) and DevelopmentKit from rubyinstaller.org
Install Ruby using the downloaded installer. Use a directory without spaces in name, i.e. don't install it to Program Files. I checked the options as below
Open command line, check if Ruby path has been added to your system. ruby --version should show the version installed, 1.9.3 in my case. If you had command line opened while installing Ruby, close and reopen it to load path.
Extract DevKit to a path with no spaces. Change to DevKit's directory (might be e.g. under Ruby's installation, i.e. C:\Ruby193\DevKit). Execute the following:
ruby dk.rb init
ruby dk.rb review (should detect Ruby's installation path correctly)
ruby dk.rb install
Install bundler gem gem install bundler
Go to Redmine home directory. Execute bundle install. You will probably (if not yet fixed) get the rmagick error - don't worry yet.
Go get ImageMagick. I picked ImageMagick-6.8.0-7-Q16-windows-dll.exe. Install to a directory whose path doesn't include spaces, e.g. C:\ImageMagick. Choose to install header files as well, as below:
Add ImageMagick home to path. Close command line and reopen it. This will reload path.
Execute `gem install rmagick --platform=ruby -- --with-opt-lib=c:/ImageMagick/lib --with-opt-include=c:/ImageMagick/include
Go to Redmine home directory again. Execute bundle install again. Should work now.
Hope that helps!

How to install a ruby gem on windows 7

Sorry to ask such a basic question. I'm trying to install tiny_tds as explain on this page. I've tried $ gem install tiny_tds, I'm getting error: Syntaxt error, unexpected $undefined. If I remove $, the error becomes undefined local variable or methos "tiny_tds". I don't know where to start to install a gem. I'm using the ruby command prompt.
Thanks for helping
I guess you should try railsinstaller for windows that includes rubygems. Then gem install tiny_tds in the command prompt.
You need to download the Ruby installer depending on you systems settings (32 or 64 bit) and the ruby development kit in order to run command lines. Here is a link to the installer and a simple guide for installing the DevKit for ruby on windows (this one is to make jekyll run on windows, jekyll is other ruby gem):
Ruby Installer:
http://rubyinstaller.org/downloads/
Devkit configuration:
http://www.madhur.co.in/blog/2011/09/01/runningjekyllwindows.html

Bundle Install not installing the gems from gemfile

I am trying to setup my rails application on Windows 7 machine. I installed Ruby 1.9.3 by using installer. I also installed Rails 3.2.2.
Now, I am trying to run bundle install from my application root directory. This command used to install all the required gems. However, when I am running in this new machine its not installing. I have to install all the gems manually one by one.
I know its bit strange but I am facing this for the first time..!!
Edit 1: Please refer below screen-shot.
Note: I have already installed few gems manually before posting here. The error related to DevKit that I am getting below has just came while I was tried to install json gem..
After Installing more gems manually:
If you read the error, it tells you that you need DevKit to install that gem on Windows. So install that and follow the instructions, then try again ;) After the json gem can be installed, it should install every other gem in the Gemfile.
(The json gem is a dependency from Rails)

Cannot install Ruby Gems in Windows 7

I have successfully installed Ruby Gems on my Mac many times. I need to configure a Windows 7 Enterprise virtual machine with Compass, Sass and Suzy.
I downloaded an installed Ruby on the Windows machine with the installer, 1.9.3. I ran gem update --system which updated Rubygems to 1.8.4.
I was able to install Sass 3.2 by running gem install sass
However, if I run gem install compass or gem install susy I get an error:
Error while excecuting gem .. (ArgumentError) marshall data too short
Any ideas? At this point, I can't install those gems.
The alternative solution..: Download gem compass from here to your ruby root folder. Then try again
gem install compass
It should install this time..Good luck
Had same issue, updating rubygems system solved it. Just use the following command
gem update --system
For those finding this question, many great tips here. Using them, I found this solution to work:
At the N: prompt in "start command line with ruby environment", I used the command rmdir /S .gem which deleted all gems. I then installed them again with gem install as directed on their respective host web pages. Hope this helps someone.

Installing Sproutcore with RubyGems fails at the haml gem

I am trying to install sproutcore on a windows xp vm (virtualbox), for development, using RubyGems. When gems reaches haml-3.0.25.gem it stops with the error:
gem install sproutcore -V
...
ERROR: While executing gem ... (Zlib::DataError)
invalid stored block lengths
I have tried both Ruby 1.8.7 and 1.9.2 as well as RubyGems 1.7.1 and 1.8.1.
I tried downloading haml 3.1.1 with git and installing it manually, but the rake would not install. It said something about 'lib/haml' not found. The directory did exist.
Other gems install just fine under all the combinations I tried. I even tried installing it under my host OS (Win 7 32-bit), but it gave the same error. Installing haml by itself changes the error message only slightly:
gem install haml -V
...
ERROR: While executing gem ... (Zlib::DataError)
invalid code lengths set
Zlib compresses and decompresses data streams from what I have read, so it sounds like the haml gem might be corrupt (although I doubt).
I am at my wits end and could find no helpful advice anywhere.
Special thanks to #saner for his contribution. After a lot of frustration, this is how I finally installed sproutcore on a Windows XP VM running on a Windows 7 host.
1) Download and install Ruby 1.9.2-p180 (remember to tick the option to include the bin directory in the PATH variable).
2) Download DevKit 4.5.1 and extract it.
3) Open a command prompt and cd to the extracted directory.
4) Run:
ruby dk.rb init
ruby dk.rb review
ruby dk.rb install
5) Download RubyGems 1.7.2 and run setup.rb
6) From the command prompt run
gem install haml -v 3.0.24
gem install eventmachine --pre
gem install sproutcore --pre
Thats it.
Enjoy.
I was able to install SproutCore on Ruby 1.9.2:
Install Ruby 1.9.2-p180
gem install sproutcore --pre
gem install eventmachine --pre
gem uninstall thin
gem install mongrel
I needed to remove thin because starting sc-server ended with errors, SproutCore will use mongrel instead of thin.
Update:
I didn't mention that I use RubyGems 1.7.2 and I have installed DevKit and Cygwin.
I removed all versions of SproutCore, Mongrel and Haml, then I typed:
gem install sproutcore --pre, SproutCore v1.6.0.beta.1 was installed.
eventmachine --pre, eventmachine (1.0.0.beta.3 x86-mingw32) was installed
SproutCore works with this setup, using mongrel was not necessary.
My configuration: sproutcore (1.6.0.beta.1), ruby 1.9.2p180, gem 1.7.2, thin (1.2.11 x86-mingw32), eventmachine (1.0.0.beta.3 x86-mingw32), haml (3.0.25), gcc version 4.5.0 (GCC)
I know this is a really old question, but since I just experienced the same problem, I've decided to add my insights on it.
So, it happened while I was trying to install the same set of gems on two different machines with different architectures, with different locations and respectively in different networks. I.e. - my home mac and a remote linux server.
So, one particular gem (dm-sqlite-adapter) failed installing on both machines, and I even tried it couple of times, but always with the same result:
$ gem install dm-sqlite-adapter
ERROR: While executing gem ... (Zlib::DataError)
invalid code lengths set
Then I spent few minutes browsing the network for a solution, including reading this thread.
Since I didn't find any satisfying answer and I wasn't pleased with the idea of reinstalling everything, decided to act dumb and tried gem install one more time.. And it worked. Then tried the other machine - worked like a charm.
So as a conclusion I'd just guess that the problem came from the remote repo and maybe the gem hadn't even downloaded at all (I forgot to check that prior to succeeding installing it). But as I said - it's just a guess..

Resources