2012-08-02 81 views
0

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

 rails -v 
    /Users/Dylan/.rvm/gems/[email protected]/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/[email protected]/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `map!' 
     from /Users/Dylan/.rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `materialize' 
     from /Users/Dylan/.rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/definition.rb:127:in `specs' 
     from /Users/Dylan/.rvm/gems/ruby-1.9.3-p1 

[email protected]/gems/bundler-1.1.5/lib/bundler/environment.rb:27:in `specs' 
    from /Users/Dylan/.rvm/gems/[email protected]/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:41:in `candidate?' 
    from /Users/Dylan/.rvm/gems/[email protected]/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:60:in `setup' 
    from /Users/Dylan/.rvm/gems/[email protected]/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>' 

就如何解决这一问题的任何想法?

+0

假设您正在从您的应用程序目录运行该程序,您在运行'bundle install'时看到了什么?是否有包含'bcrypt-ruby'的输出行? – Kelvin 2012-08-02 17:43:48

回答

1

好像你需要安装bcrypt-ruby

也许尝试sudo gem install bcrypt-ruby

+0

不是一个好主意,看到他在使用捆绑软件。 – Kelvin 2012-08-02 17:49:04

0

运行bundle install然后运行bundle exec rails -v看看是否清除问题。