Problems with postgres and Unicorn server

余生颓废 提交于 2019-12-13 00:52:12

问题


When I try running Unicorn after setting up postgres (works perfectly with Trinidad and Thin) I get the following error.

dyld: lazy symbol binding failed: 
Symbol not found: _rb_thread_select 
Referenced from:/Users/pls/.rvm/gems/ruby-2.2.0@coinino/extensions/x86_64-darwin-13/2.2.0/do_postgres-0.10.14/do_postgres/do_postgres.bundle
  Expected in: flat namespace

Datamapper connects to the database normally inside a model.rb which then is required in app.rb.

What is wrong and how do I fix it?

Edit: Looks like this is a bug in Ruby 2.2.0.


回答1:


A call used by old versions of the pg gem has been removed in Ruby 2.2. More recent versions of the gem no longer use this call; I know the latest version (0.18.1) doesn't, but I don't know when that change was made. You can update the pg gem by running the following command:

bundle update pg

As long as you're doing this, you may want to run just a plain bundle update to update all of your project's gems to the most recent versions—who knows what else might be incompatible with Ruby 2.2?

As always when updating dependencies, test that the update doesn't introduce any new bugs before you deploy the new version to production. I doubt pg will cause any problems, but other gems might.




回答2:


It looks like this is a bug in Ruby 2.2.0. Going to Ruby 2.1.5 gets things going without trouble.



来源:https://stackoverflow.com/questions/27862098/problems-with-postgres-and-unicorn-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!