我在bcrypt-ruby - any版本的Mac ruby 1.9.3p448 (41675-06-27修订版)上遇到了问题。如果我安装bcrypt - Rspec,也要求安装bcrypt-ruby ...(为什么?我也是Rails的初学者--使用M.Hartl...)
.After安装‘’bcrypt ruby‘-按照我尝试所有版本的顺序-我得到这样的结果:
$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!怎么回事!?我在这个文档中做了所有的事情^,但是问题并没有消失……
发布于 2014-06-16 14:25:50
尝试使用旧版本的'bcrypt-ruby'并省略'bcrypt',但建议使用'bcrypt'而不是'bcrypt-ruby'。例如,'bcrypt-ruby', '~> 3.0.1'。
发布于 2014-06-14 02:41:33
这看起来像是bundler中的一个bug,是由你使用它的方式触发的。
正确的命令是:
bundle show bcrypt-ruby没有方括号,没有引号。
发布于 2014-06-16 15:29:21
如果想要查看机器上安装的bcrypt-ruby的所有版本,可以使用以下命令
gem list bcrypt-ruby它将显示机器上安装的bcrypt-ruby的所有版本。
https://stackoverflow.com/questions/24211183
复制相似问题