[英]Installing Gem Error - Failed to build gem native extension
我繼承了Ruby on Rails項目。 它是全部壓縮的,所以作為第一步,我想讓它在我的桌面Mac上運行:
腳本/服務器
=>啟動WEBrick ... /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:74:in establish_connection': Please install the postgresql adapter:
gem install activerecord-postgresql-adapter`(沒有這樣的文件加載 - pg)(RuntimeError)
所以,我嘗試安裝activerecord-postgresql-adapter gem然后得到這個:
$ sudo gem install activerecord-postgresql-adapter
Password:
Building native extensions. This could take a while...
ERROR: Error installing activerecord-postgresql-adapter:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb mkmf.rb在/System/Library/Frameworks/Ruby.framework/Versions/1.8/找不到ruby的頭文件usr / lib中/紅寶石/ ruby.h
Gem文件將保留在/Library/Ruby/Gems/1.8/gems/pg-0.14.1中以供檢查。 結果記錄到/Library/Ruby/Gems/1.8/gems/pg-0.14.1/ext/gem_make.out
我怎樣才能安裝這個必需的寶石?
謝謝
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.