Ruby on rails 每个Rails命令都失败了
我最近遇到了一个问题,在绝望中决定在我的OS X 10.6上卸载并重新安装Ruby和Rails。我已经重新安装了Ruby和gem安装的rails。不过,现在,每次尝试运行rails命令(偶数-v)时,我都会遇到此错误或类似错误:Ruby on rails 每个Rails命令都失败了,ruby-on-rails,ruby,macos,Ruby On Rails,Ruby,Macos,我最近遇到了一个问题,在绝望中决定在我的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:“物化中的块”:在任何源中都找不到bcrypt-ruby-3.0.1(
rails-v
/Users/Dylan/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.5/lib/bundler/spec_set.rb:90:“物化中的块”:在任何源中都找不到bcrypt-ruby-3.0.1(bundler::GemNotFound)
来自/Users/Dylan/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in'map!'
来自/Users/Dylan/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in'materialize'
来自/Users/Dylan/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.5/lib/bundler/definition.rb:127:in'specs'
来自/Users/Dylan/.rvm/gems/ruby-1.9.3-p1
25@global/gems/bundler-1.1.5/lib/bundler/environment.rb:27:in'specs'
来自/Users/Dylan/.rvm/gems/ruby-1.9.3-p125@global/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:41:in'candidate'
来自/Users/Dylan/.rvm/gems/ruby-1.9.3-p125@global/gems/rubygems-bundler-1.0.3/lib/rubygems bundler/noexec.rb:60:in'setup'
来自/Users/Dylan/.rvm/gems/ruby-1.9.3-p125@global/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:75:in`'
from/Users/Dylan/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site\u ruby/1.9.1/rubygems/custom\u require.rb:60:in'require'
来自/Users/Dylan/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site\u ruby/1.9.1/rubygems/custom\u require.rb:60:“在require中救援”
from/Users/Dylan/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site\u ruby/1.9.1/rubygems/custom\u require.rb:35:in'require'
来自/Users/Dylan/.rvm/gems/ruby-1.9.3-p125/bin/ruby\u noexec\u包装:9:in`'
关于如何解决这个问题有什么想法吗?看来您需要安装
也许可以尝试
sudogem安装bcrypt-ruby
?运行bundle-install
,然后运行bundle-exec-rails-v
看看这是否可以解决问题。假设您是从应用程序目录运行它,那么运行bundle-install
时会看到什么?是否有包含bcrypt ruby
的输出行?
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>'