我是ruby on rails的新手,我刚下载了一个我朋友发给我的新Rails项目目录。我将该目录放在桌面上并插入其中。我想在我的本地主机上使用代码来学习代码。但是当我试图运行" rails s"时,它给出了错误说
"Could not find pg-0.17.1 in any of the sources
Run `bundle install` to install missing gems."
所以我跑了"捆绑安装",然后它给出了错误
"An error occurred while installing pg (0.17.1), and Bundler cannot continue.
Make sure that `gem install pg -v '0.17.1'` succeeds before bundling."
我用谷歌搜索了一段时间,但我找不到任何解决方案.. " rails s"在我自己的项目目录中,Stills工作正常。但是我怎样才能使它在我刚下载的目录中运行?我应该做一些其他设置还是安装?
答案 0 :(得分:1)
确保您已在本地计算机上安装了postgres。
答案 1 :(得分:0)
这是我在Mac上制作开发环境的方法。
通过Homebrew软件包管理器brew install postgresql
安装PostgreSQL。这应该为gem编译安装所有必需的头文件。