Error requiring pg under rvm with postgres.app

前端 未结 4 1460
感情败类
感情败类 2021-01-19 03:12

I\'m using Postgres.app on OS X (10.8.3). I have modified my PATH so that the bin folder for the app is before all others.

Rammy:~          


        
4条回答
  •  孤独总比滥情好
    2021-01-19 03:27

    The problem is in the linking of the gem to the Postgres.app. If you link it to the postgres version that ships with osx

    Here's a small script:

    • if using rvm with project gemsets: change into your project
    • run the following commands:

      gem uninstall pg
      
      PATH=${PATH/'Postgres.app'/'WRONGFOLDER.app'}
      gem install pg
      PATH=${PATH/'WRONGFOLDER.app'/'Postgres.app'}
      
    • Now everthing should be fine

提交回复
热议问题