简体   繁体   English

安装pg(1.1.4)时发生错误,并且Bundler无法继续

[英]An error occurred while installing pg (1.1.4), and Bundler cannot continue

Trying to execute bundle 试图执行bundle

$ gem install pg -v '1.1.14' --source 'https://rubygems.org/'

Gem files will remain installed in /home/saishbhende24/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/pg-1.1.4 for inspection. 宝石文件将保留安装在/home/saishbhende24/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/pg-1.1.4中,以进行检查。 Results logged to /home/saishbhende24/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0-static/pg-1.1.4/gem_make.out An error occurred while installing pg (1.1.4), and Bundler cannot continue. 结果记录到/home/saishbhende24/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0-static/pg-1.1.4/gem_make.out错误在安装pg(1.1.4)时发生错误,并且Bundler无法继续。 Make sure that gem install pg -v '1.1.4' --source 'https://rubygems.org/' succeeds before bundling. 捆绑之前,请确保gem install pg -v '1.1.4' --source 'https://rubygems.org/'成功。 In Gemfile: pg saishbhende24@DESKTOP-ELUO53H:/mnt/c/saishrails/r5.1 $ gem install pg -v '1.1.14' --source 'https://rubygems.org/' ERROR: Could not find a valid gem 'pg' (= 1.1.14) in any repository ERROR: Possible alternatives: pg 在Gemfile中:pg saishbhende24 @ DESKTOP-ELUO53H:/mnt/c/saishrails/r5.1 $ gem install pg -v '1.1.14' --source 'https://rubygems.org/' -v'1.1.14 $ gem install pg -v '1.1.14' --source 'https://rubygems.org/' --source'https://rubygems.org/ $ gem install pg -v '1.1.14' --source 'https://rubygems.org/'错误:找不到任何存储库中的有效gem'pg'(= 1.1.14)错误:可能的选择:pg

Output is rails server 输出是rails server

Make sure you have installed postgres for Windows. 确保已安装Windows的postgres。 There are official installers here . 这里有官方安装程序 Then try again. 然后再试一次。

Then, if you still experience problems, try manually installing the pg gem first by: 然后,如果仍然遇到问题,请尝试首先通过以下方式手动安装pg gem:

bundle install pg

If you still have trouble you can also look at running rails, postgres, and all your other dependencies like the rest of your gems, redis, etc., on docker. 如果仍然遇到问题,您还可以在docker上查看运行的rails,postgres以及所有其他依赖项,例如其余的gem,redis等。 Running ruby on Windows is a notoriously horrible experience. 在Windows上运行红宝石是一个令人震惊的经历。 There's many things which aren't as easy as they are on Linux. 有很多事情并不像在Linux上那样简单。 Docker can solve a lot of those problems for you if you're still having trouble. 如果您仍然遇到问题,Docker可以为您解决很多此类问题。

gem sources --add https://rubygems.org/ 

解决了此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 安装pg(1.2.1)时出错,Bundler无法继续 - An error occurred while installing pg (1.2.1), and Bundler cannot continue 安装pg(1.2.3)时出错,Bundler无法继续 - An error occurred while installing pg (1.2.3), and Bundler cannot continue 安装 pg (0.15.1) 时出错,Bundler 无法继续 - An error occurred while installing pg (0.15.1), and Bundler cannot continue 安装pg(0.18.2)时发生错误,并且Bundler无法继续 - An error occurred while installing pg (0.18.2), and Bundler cannot continue 安装 pg (0.18.4) 时出错,Bundler 无法继续 - An error occurred while installing pg (0.18.4), and Bundler cannot continue 安装pg(0.19.0)时发生错误,Bundler无法继续 - An error occurred while installing pg (0.19.0), and Bundler cannot continue 安装 pg (0.17.1) 时出错,Bundler 无法继续 - An error occurred while installing pg (0.17.1), and Bundler cannot continue 安装pg(0.15.1)时发生错误,Bundler无法继续 - error occurred while installing pg (0.15.1), and Bundler cannot continue Ubuntu 14.04-安装pg(0.18.2)时发生错误,并且Bundler无法继续 - Ubuntu 14.04 - An error occurred while installing pg (0.18.2), and Bundler cannot continue Rails - 安装 pg (1.1.3) 时出现 Gem 错误,并且 Bundler 无法继续 - Rails - Gem Error while installing pg (1.1.3), and Bundler cannot continue
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM