求高手指點(diǎn):Rails安裝的問(wèn)題,為什么gem install可以成功而bundle install會(huì)失敗?Debian Testing系統(tǒng)# gem install bcrypt-ruby Building native extensions. T-is could take a w-ile...Successfully installed bcrypt-ruby-2.1.41 gem installed成功!但是:# bundle install --pat-=vendor/bundle錯(cuò)誤:Installing bcrypt-ruby (2.1.4) wit- native extensions /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions": ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) /usr/local/bin/ruby extconf.rb Gem files will re-in installed in /root//quora/vendor/bundle/ruby/1.9.1/gems/bcrypt-ruby-2.1.4 for inspection. Results logged to /root//quora/vendor/bundle/ruby/1.9.1/gems/bcrypt-ruby-2.1.4/ext/mri/gem_-ke.out from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:486:in `block in build_extensions" from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:446:in `eac-" from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:446:in `build_extensions" from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:198:in `install" from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/source.rb:96:in `install" from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/installer.rb:55:in `block in run" from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/spec_set.rb:12:in `block in eac-" from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/spec_set.rb:12:in `eac-" from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/spec_set.rb:12:in `eac-" from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/installer.rb:44:in `run" from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/installer.rb:8:in `install" from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/cli.rb:225:in `install" from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vendor/t-or/task.rb:22:in `run" from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vendor/t-or/invocation.rb:118:in `invoke_task" from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vendor/t-or.rb:246:in `dispatc-" from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vendor/t-or/base.rb:389:in `start" from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/bin/bundle:13:in `" from /usr/local/bin/bundle:19:in `load" from /usr/local/bin/bundle:19:in `"3 個(gè)答案
答案 1:
請(qǐng)先 w-ic- ruby 和 w-ic- gem 看一下是否同一套 ruby ...
答案 2:
ubuntu下面的bundle很詭異,你在bundle之前加上sudo看看ps: bundle install 可以簡(jiǎn)寫(xiě)為 bundle
答案 3:
重啟一下試試,我遇到過(guò)類(lèi)似問(wèn)題,重啟解決了