0

i've problem on Mac ruby 1.9.3p448 (2013-06-27 revision 41675) with bcrypt-ruby - any version. If i install bcrypt - Rspec ask to install bcrypt-ruby too...(( why? i' m in the begin of Rails too - with M.Hartl....))
.After installing'bcrypt-ruby'- in order i try all versions- i take this result:

$bundle install
.....
Using sass-rails 4.0.3
Using activeadmin 1.0.0.pre from git://github.com/gregbell/active_admin.git (at master)
Using bcrypt 3.1.7
Using bcrypt-ruby 3.1.5
Using bootstrap-sass 2.3.2.0
Using mini_portile 0.6.0
Using nokogiri 1.6.2.1
.....

 $bundle exec rspec spec/
You don't have bcrypt-ruby installed in your application. Please add it to your Gemfile and run bundle install
/Users/alla/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/rubygems_integration.rb:262:in `block in replace_gem': can't activate bcrypt-ruby (~> 3.0.0), already activated bcrypt-ruby-3.1.5. Make sure all dependencies are added to Gemfile. (Gem::LoadError)

bundle show ['bcrypt-ruby']
Unfortunately, a fatal error has occurred. Please see the Bundler troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!


What the matter!? I do all in this documentation^, but problem don't disappear...

3 Answers3

2

Try with the older versions of 'bcrypt-ruby' and omit 'bcrypt' though it is recommended to use 'bcrypt' instead of 'bcrypt-ruby'. For instance, 'bcrypt-ruby', '~> 3.0.1'.

Tarique
  • 4,017
  • 1
  • 26
  • 25
  • I comented ALL bcrypt-gems in the Gemfile.lock - i've error in `'bundle install'`comand, i returne bcrypt in `'devise-block of gems'` only, then added `'bcrypt-ruby' ~>'3.0.1'` in Gemfile.. after that `'bundle install'` was running... and all is good in finaly!) – Alla Johnson Jun 19 '14 at 09:19
1

That looks like a bug in bundler triggered by how you're using it.

The correct command is:

bundle show bcrypt-ruby

No square brackets, no quotes.

tadman
  • 208,517
  • 23
  • 234
  • 262
  • Thanks for answer on my question! I haven't 'fatal-error', in same situation with some another gem, just in this kind of calling command, with bcrypt-ruby only... – Alla Johnson Jun 13 '14 at 19:35
  • If the program really explodes like this chances are it's not your fault. Even if you're mis-using it, the program should fail gracefully. I've [submitted a bug](https://github.com/bundler/bundler/issues/3065) and the Bundler team is looking at it. – tadman Jun 13 '14 at 20:02
0

If you want to see the all the versions of bcrypt-ruby installed on your machine then you can use following command

gem list bcrypt-ruby

It will show you all the versions of bcrypt-ruby installed on machine.

Deepti Kakade
  • 3,053
  • 3
  • 19
  • 30