sudo gem install pg won't work

后端 未结 2 494
囚心锁ツ
囚心锁ツ 2020-12-31 06:12

I\'m trying to get Rails to work with PostgreSQL. Apparently one thing I need to do along the way is sudo gem install pg. When I do that, I get this:

         


        
2条回答
  •  南方客
    南方客 (楼主)
    2020-12-31 06:38

    You need to install your distro ruby-dev (or devel) package otherwise you won~t be able to build any ruby C extensions.

    I'm not on ubuntu, but you package-manager command might be somewhat like this:

    $ sudo apt-get install ruby-dev build-essential
    

提交回复
热议问题