Я пытаюсь установить gem postgres «pg» в моем приложении rack/bundler и продолжать сбой при попытке установить через RubyMine.Приложение Sinatra/Rack/Bundler не может установить postgres gem
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using addressable (2.3.5)
Using bcrypt-ruby (3.1.2)
Using data_objects (0.10.13)
Using dm-core (1.2.1)
Using dm-aggregates (1.2.0)
Using dm-constraints (1.2.0)
Using dm-migrations (1.2.0)
Using fastercsv (1.5.5)
Using json (1.8.1)
Using json_pure (1.8.0)
Using multi_json (1.8.2)
Using dm-serializer (1.2.2)
Using dm-timestamps (1.2.0)
Using dm-transactions (1.2.0)
Using stringex (1.5.1)
Using uuidtools (2.1.4)
Using dm-types (1.2.2)
Using dm-validations (1.2.0)
Using datamapper (1.2.0)
Using dm-do-adapter (1.2.0)
Installing do_postgres (0.10.13)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/adam419/.rvm/rubies/ruby-2.0.0-p195/bin/ruby extconf.rb
checking for main() in -lpq... yes
checking for libpq-fe.h... no
*** 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.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/adam419/.rvm/rubies/ruby-2.0.0-p195/bin/ruby
--with-pgsql-server-dir
--without-pgsql-server-dir
--with-pgsql-server-include
--without-pgsql-server-include=${pgsql-server-dir}/include
--with-pgsql-server-lib
--without-pgsql-server-lib=${pgsql-server-dir}/
--with-pgsql-client-dir
--without-pgsql-client-dir
--with-pgsql-client-include
--without-pgsql-client-include=${pgsql-client-dir}/include
--with-pgsql-client-lib
--without-pgsql-client-lib=${pgsql-client-dir}/
--with-pqlib
--without-pqlib
Could not find PostgreSQL build environment (libraries & headers): Makefile not created
Gem files will remain installed in /Users/adam419/.rvm/gems/[email protected]/gems/do_postgres-0.10.13 for inspection.
Results logged to /Users/adam419/.rvm/gems/[email protected]/gems/do_postgres-0.10.13/ext/do_postgres/gem_make.out
An error occurred while installing do_postgres (0.10.13), and Bundler cannot
continue.
Make sure that `gem install do_postgres -v '0.10.13'` succeeds before bundling.
Так по какой-то причине, с моим текущим проектом, если установить драгоценный камень через командную строку не добавляются в папку внешних библиотек в RubyMine, и до сих пор полагались на его собственном пачке/gem installer. Поэтому, прочитав другие вопросы, я увидел, чтобы загрузить поддержку Postgres93 для Mac os x, и в командной строке я попытался установить gem postgres, указав путь к файлу pg_config, и он загрузился успешно, но не был добавлен в библиотеки в проекте в Rubymine.
sudo gem install pg -- --with-pg config=/Applications/Postgres93.app/Contents/MacOS/bin/pg_config
Вышеуказанная команда работала, но не вызывает камень, чтобы появиться в RubyMine, и, таким образом, я до сих пор не в состоянии нажать на Heroku. Таким образом, при попытке дать дополнительные аргументы установщиком расслоении я получаю синтаксических ошибок при вводе в
--with-pg-config=/Applications/Postgres93.app/Contents/MacOS/bin/pg_config
Любые идеи, как решить эту проблему?
0 Теперь, когда sudo gem install pg с аргументами даже не работает. –