Installing the PostgreSQL gem with 'gem pq' fails with ERROR: Failed to build gem native extension

前端 未结 3 1202
野性不改
野性不改 2020-12-23 12:58

I am learning Ruby on Rails and trying to develop an application. In my application I am trying to use the default SQLite database in the Development Mode a

相关标签:
3条回答
  • 2020-12-23 13:29

    for those who reached this by google search if libpq-dev didnt work or threw another errors i hade the same problem try upgrading your system and get the ruby div-kit

    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install ruby1.9.1-dev
    

    then reboot after this just try again

    ...

    0 讨论(0)
  • 2020-12-23 13:34

    If you are using Ubuntu try to install following lib file

    sudo apt-get install libpq-dev
    

    and then gem install pg

    worked for me.

    0 讨论(0)
  • 2020-12-23 13:52

    You have to do this

    sudo apt-get install libgmp-dev libpq-dev
    

    and then

    gem install pg
    
    0 讨论(0)
提交回复
热议问题