0

我最近遇到了一个问题,绝望地决定在我的 OS X 10.6 上卸载并重新安装 Ruby 和 Rails。我已经重新安装了 Ruby 和 gem 安装的 rails。但是,现在,每次尝试运行 rails 命令(甚至是 -v)时,我都会收到此错误或类似错误:

       rails -v
    /Users/Dylan/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.5/lib/bundler/spec_set.rb:90:in `block in materialize': Could not find bcrypt-ruby-3.0.1 in any of the sources (Bundler::GemNotFound)
        from /Users/Dylan/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `map!'
        from /Users/Dylan/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `materialize'
        from /Users/Dylan/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.5/lib/bundler/definition.rb:127:in `specs'
        from /Users/Dylan/.rvm/gems/ruby-1.9.3-p1

25@global/gems/bundler-1.1.5/lib/bundler/environment.rb:27:in `specs'
    from /Users/Dylan/.rvm/gems/ruby-1.9.3-p125@global/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:41:in `candidate?'
    from /Users/Dylan/.rvm/gems/ruby-1.9.3-p125@global/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:60:in `setup'
    from /Users/Dylan/.rvm/gems/ruby-1.9.3-p125@global/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:75:in `<top (required)>'
    from /Users/Dylan/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
    from /Users/Dylan/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
    from /Users/Dylan/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from /Users/Dylan/.rvm/gems/ruby-1.9.3-p125/bin/ruby_noexec_wrapper:9:in `<main>'

有想法该怎么解决这个吗?

4

2 回答 2

1

看来您需要安装bcrypt-ruby

也许试试sudo gem install bcrypt-ruby

于 2012-08-02T16:43:44.780 回答
0

运行bundle install然后运行bundle exec rails -v看看这是否解决了问题。

于 2013-03-19T14:56:04.717 回答