导轨中的PG pg_ext 加载错误 [英] PG pg_ext load error in rails

查看:21
本文介绍了导轨中的PG pg_ext 加载错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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:

https://bitbucket.org/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:

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

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

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

这篇关于导轨中的PG pg_ext 加载错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆