在PostgreSQL 9.3上安装PL / Ruby [英] Installing PL/Ruby on PostgreSQL 9.3

查看:136
本文介绍了在PostgreSQL 9.3上安装PL / Ruby的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用PL / Ruby程序语言,但git库似乎维护得不太好:
https://github.com/Absolight/postgresql-plruby/tree/fixup-9-3

I'd like to use the PL/Ruby procedural languages but it seems the git repository is not very well maintained: https://github.com/Absolight/postgresql-plruby/tree/fixup-9-3

当我要创建新语言时:

create function plruby_call_handler() returns language_handler
as '/var/lib/postgresql/.rvm/rubies/ruby-2.1.3/lib/ruby/site_ruby/2.1.0/x86_64-linux/plruby'
language 'c'; -- Warning: the 'c' has to be lowercase, unlike the example on git.

我收到以下错误:

 ERROR:  could not load library "/var/lib/postgresql[...]plruby": undefined symbol: plruby_s_load

我在Ubuntu 14.10上使用Ruby 2.1.4和PostgreSQL 9.3。

I'm using Ruby 2.1.4 with PostgreSQL 9.3 on Ubuntu 14.10.

推荐答案

请检查您是否正在从分支fixup-9-3编译该源并运行PostgreSQL版本9.3

Please check if you are compiling that source from branch fixup-9-3 and run postgresql version 9.3

  git clone https://github.com/Absolight/postgresql-plruby.git
  cd postgresql-plruby
  git checkout fixup-9-3

因为从master分支安装时遇到了几乎相同的问题。也尝试安装libpq-dev。我正在使用OSX 10.10,安装PostgreSQL库所需要做的就是 brew install postgresql ,这在我的机器上有效。

Because I had almost same problem when installing from master branch. Also try to install libpq-dev. I am using OSX 10.10 all I need to do to install PostgreSQL library was brew install postgresql and this worked on my machine.

这篇关于在PostgreSQL 9.3上安装PL / Ruby的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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