Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pg gem Trace/BPT trap: 5 error on MAC OS X lion

I recently upgraded my snow leopard to lion and in one of my apps i get

=> Booting WEBrick
=> Rails 3.0.4 application starting in development on http://0.0.0.0:4000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-08-16 17:47:27] INFO  WEBrick 1.3.1
[2011-08-16 17:47:27] INFO  ruby 1.9.2 (2011-07-09) [x86_64-darwin11.0.0]
[2011-08-16 17:47:27] INFO  WEBrick::HTTPServer#start: pid=3460 port=4000
Trace/BPT trap: 5

the app quits and there is no other output , it does run with sqlite3 as the db gem. I commented all other gems but this one and still got the erros. i see this error not when the app is loading but when it tries to answer the first request.

Anyone knows another gem to connect to postgresql or any workaround?

EDIT: OK here is some clarification.

I started this project on snow leopard and it worked perfectly, I had rvm installed , the pg gem, webrick and ruby 1.9.2-p180, I upgraded to lion and keep working on other projects, when the time come to update this project , i got the Trace/BPT trap: 5 error, and the server gives no other clue of what is going on. My guess is that this is something very low level and the ruby interpreter does not even gets the chance to show the exception and this message is STDIO related.

Trying to fix this i have: reinstalled rvm , installed ruby 1.9.2-p290, reinstalled postgresql, deleted and rebuild the gemset for the project, installed mongrel and still the app crashes web it gets the first web request, note that it does work on the rails console.

EDIT 2: It is now running on ruby-1.8.7-352 so it seem is a 1.9.2 related issue on MAC OS X 10.7

EDIT 3: Is a XCODE 4.1 issue that has to do with llvm compiler and the "optimization" it does when there is need to build with native extension. The solution is to install a compatible Xcode, more info can be found at the RVM site.

like image 493
radha Avatar asked Aug 17 '11 02:08

radha


1 Answers

I fixed this - it was a simple issue of a missing "gem 'pg'" in my Gemfile. For various reasons it had been commented out.

like image 117
Anna Billstrom Avatar answered Oct 25 '22 02:10

Anna Billstrom