# Facebooker SystemExit

**URL:** <https://www.ruby-forum.com/t/facebooker-systemexit/181271>\
**Category:** Rails\
**Created:** [January 8, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/facebooker-systemexit/181271 "2010-01-08T16:22:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![david](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@david](https://www.ruby-forum.com/u/david)\
**Post date:** [January 8, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/facebooker-systemexit/181271/1 "2010-01-08T16:22:46Z")

</div>

Hello,

I have a problem with an application using facebooker plugin that  
works fine locally using Mongrel but breaks in fastcgi production  
environment.

I am using the authlogic\_facebook\_connect plugin with  
facebook\_skip\_new\_user\_creation true so that I can have the user sign  
up with real email, or check email hash to see if they are already in  
the system.

The following code snippet isolates the problem I am facing:

before\_filter :set\_facebook\_session  
def dummy  
raise “no facebook session” if facebook\_session.nil?  
if facebook\_session  
user = facebook\_session.user  
if user  
emails = facebook\_session.user.email\_hashes  
if emails  
raise emails.inspect  
else  
raise “no dice”  
end  
else  
raise “no facebook user”  
end  
end  
end

When it gets to the “emails = facebook\_session.user.email\_hashes”  
line, it throws a SystemExit error. Here is the relevant portion of  
the stack trace:

/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/fcgi\_handler.rb:  
160:in `exit' /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/fcgi_handler.rb: 160:in`exit\_now\_handler’  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
`to_proc' [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/service/ curl_service.rb:9:in`call’  
[RAILS\_ROOT]/vendor/plugins/facebooker/lib/facebooker/service/  
curl\_service.rb:9:in `perform' [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/service/ curl_service.rb:9:in`http\_post’  
[RAILS\_ROOT]/vendor/plugins/facebooker/lib/facebooker/service/  
curl\_service.rb:9:in `post_form' [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/service.rb: 78:in`post\_form’  
[RAILS\_ROOT]/vendor/plugins/facebooker/lib/facebooker/service.rb:  
66:in `post' [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/session.rb: 636:in`post\_without\_logging’  
[RAILS\_ROOT]/vendor/plugins/facebooker/lib/facebooker/session.rb:  
647:in `post' [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/logging.rb: 20:in`log\_fb\_api’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/  
active\_support/core\_ext/benchmark.rb:10:in `realtime' [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/logging.rb: 20:in`log\_fb\_api’  
[RAILS\_ROOT]/vendor/plugins/facebooker/lib/facebooker/session.rb:  
646:in `post' [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/models/user.rb: 194:in`populate’  
[RAILS\_ROOT]/vendor/plugins/facebooker/lib/facebooker/model.rb:35:in  
`email_hashes' [RAILS_ROOT]/app/controllers/user_sessions_controller.rb:30:in`create’

Looks like it’s having a problem making a curl request to facebook.  
Mind you, this is after facebook has already connected. Any ideas  
would be greatly appreciated!

Thanks,  
DF

---

<div class="post-metadata">

**Author:** ![david](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@david](https://www.ruby-forum.com/u/david)\
**Post date:** [January 8, 2010, 6:10pm UTC](https://www.ruby-forum.com/t/facebooker-systemexit/181271/2 "2010-01-08T18:10:29Z")

</div>

Problem solved. A patch to the facebooker plugin’s curl\_service.rb  
file did the trick.
