rails中的PG pg

编程入门 行业动态 更新时间:2024-10-25 20:28:03
本文介绍了rails中的PG pg_ext加载错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我最近更新到 rails 4.1.6 和 ruby​​ 2.1.3p242.我还更新了系统上的所有 gem.创建新应用程序后,我在运行服务器时不断收到 pg_ext 加载文件错误.我在带有 PostgreSQL 9.3 的 Windows 8 x64 上.在我之前的 RoR 安装(rails 3.2 和 ruby​​ 1.9.3)下,pg gem 运行良好.

I recently updated to rails 4.1.6 and ruby 2.1.3p242. I also updated all gems on my system. After creating a new app, I keep getting a pg_ext load file error on running the server. I'm on windows 8 x64 with PostgreSQL 9.3. The pg gem was working fine under my previous RoR installation which was rails 3.2 and ruby 1.9.3.

在 gem 的安装目录下,我有一个 2.0/pg_ext.so 文件.我尝试将文件夹重命名为 2.1 并运行服务器.结果是一样的.我认为这是因为 Ruby 不允许 Require .so 文件.以下是错误截图:

Under the gem's installation directory, I've a 2.0/pg_ext.so file. I tried renaming the folder to 2.1 and ran the server. The result was the same. I assume it's cause Ruby doesn't allow to Require a .so file. Below is the screenshot of the error:

任何帮助将不胜感激.谢谢!

Any help would be really appreciated. Thanks!

推荐答案

在 Gem 官方页面发布问题:

Posted question on the official Gem page:

bitbucket/ged/ruby-pg/issue/192/pg_ext-load-error

根据建议,我安装了下一个版本的预版本.这给了我另一个错误,使用以下方法解决了:

As per the suggestion, I installed the pre-version of the next release. That gave me another error which was solved using:

github/tzinfo/tzinfo/wiki/Resolving-TZInfo::DataSourceNotFound-ErrorsTZInfo::DataSourceNotFound 启动 Rails v4.1.0 服务器时出错窗户

发布答案以帮助将来遇到类似问题的人.

Posting the answer to help people facing similar problems in the future.

更多推荐

rails中的PG pg

本文发布于:2023-10-16 16:54:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1498172.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:rails   PG   pg

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!