2016-06-16 4 views
2

小さなレールプロジェクトでRubymineを試してみましたが、デバッグがうまくいきたいと思います。 このプロジェクトは、rails APIであり、私のMacでEl Capitanを実行しているPostgresを使用しています。 私が持っている問題は、Rubymineは「No Rails in SDK」という文句を言っていますRubymine pgインストールエラー

Rubymineメニューからバンドルインストールを実行することだと思いました。 Bundler::GemNotFound: Could not find rake-10.3.2 in any of the sources An error occurred while installing pg (0.17.1), and Bundler cannot continue

と使用して(私は思う)私のマシン上のpostgresをインストールしている:私はを含むスタックオーバーフロー上の他のソリューションの数々試してみました

.... 
Using hashie 3.4.3 
Using multi_json 1.11.2 
Using multi_xml 0.5.5 
Using newrelic_rpm 3.14.2.312  
Installing pg 0.18.4 with native extensions 


Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 


    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20160617-92261-aw26bh.rb extconf.rb 
checking for pg_config... yes 
Using config values from /usr/local/bin/pg_config 
checking for libpq-fe.h... yes 
checking for libpq/libpq-fs.h... yes 
checking for pg_config_manual.h... yes 
checking for PQconnectdb() in -lpq... no 
checking for PQconnectdb() in -llibpq... no 
checking for PQconnectdb() in -lms/libpq... no 
Can't find the PostgreSQL client library (libpq) 
*** 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 
    --without-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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby 
    --with-pg 
    --without-pg 
    --enable-windows-cross 
    --disable-windows-cross 
    --with-pg-config 
    --without-pg-config 
    --with-pg_config 
    --without-pg_config 
    --with-pg-dir 
    --without-pg-dir 
    --with-pg-include 
    --without-pg-include=${pg-dir}/include 
    --with-pg-lib 
    --without-pg-lib=${pg-dir}/ 
    --with-pqlib 
    --without-pqlib 
    --with-libpqlib 
    --without-libpqlib 
    --with-ms/libpqlib 
    --without-ms/libpqlib 

extconf failed, exit code 1 

... 
Using faraday 0.9.2 
Using hashie-forbidden_attributes 0.1.1 
Using httparty 0.13.7 
An error occurred while installing pg (0.18.4), and Bundler cannot continue. 
Make sure that `gem install pg -v '0.18.4'` succeeds before bundling. 

:それは一貫してPGをインストールで失敗が アプリと醸造。

この作品を作成するためのアイデアは大変ありがとうございます。

+0

出力全体を投稿することができます(できればコードとしてフォーマットされています。[formatting](http://stackoverflow.com/help/formatting)を参照)、多くの推測を省くことができます。 – grochmal

+0

[railsintaller](http://railsinstaller.org/ja)をインストールしようとしましたか?それは私がやったことだとうまくRubymineで動作します – mrvncaragay

+0

@grochmal良い点は、インストールされた他のすべての宝石のリストなしで、関連する出力の残りを追加しました –

答えて

0

私はRubyMine関連のエラーではないと思います。私はそれがシステム関連だと思う。

つまり、コマンドラインでgem install pgを実行すると、同じエラーが発生する可能性があります。

私はrvmを使用しています。必要なシステムライブラリをインストールします。 (他の人は時々困難を感じていました)

rvmの使用に興味がある場合は、「install rvm」と入力して、インストール手順のリンクを取得してください。

つまり、コマンドラインで使用しているのと同じRubyをプロジェクトで使用するようにRubyMineが設定されていることを確認する必要があります。そうすれば、両方の環境で一貫した結果が得られます。

また、ちょうどFYI、RubyMineの質問のために[email protected]にメールすることができます。

+0

これは私が思っていたことですが、驚くべきことに宝石のインストールはコマンドラインでうまく動作します。唯一Rubymineのbundler - >インストールで問題があること はrvmに感謝します! –