मैं अपने gemfileजब मैं बंडल इंस्टॉल करता हूं तो मैम इंस्टॉलेशन के लिए पैरामीटर कैसे पास कर सकता हूं?
gem 'pg'
को pg gem जोड़ा जब मैं bundle install
चलाने के लिए, मैं इस त्रुटि मिलती है:
Installing pg (0.10.1) with native extensions /Users/ben/.rvm/rubies/ruby-1.9.2-p0/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)
/Users/benhartney/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
ऐसा लगता है कि मैं इस config पैरामीटर
--with-pg-config=/path/to/pg_config
में पारित करने के लिए की जरूरत है जब मैं bundle install
का उपयोग करता हूं तो मैं यह कैसे कर सकता हूं?
bundle config build.pg --with-pg-config=/path/to/pg_config
और जानकारी से पहले bundle config man page
बहुत बढ़िया! ऐसा लगता है कि यह इसे कॉन्फ़िगरेशन में संग्रहीत करता है और भविष्य में इसका उपयोग किया जाएगा। धन्यवाद! – Josh