Rails: fb_connect_async_js provokes 500 error

泪湿孤枕 提交于 2019-12-25 02:16:31

问题


I am a new comer in Ruby on Rails. I am currently trying to install Facebooker2 gem on my project to allow users to connect through this famous network. I followed official installation guide. However, I still got an issue.

When I am using *fb_connect_async_js* helper, I got a 500 error. Server logs tell me the following:

Error during failsafe response: incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string)

Have you any solution?

My Gemfile, if it may be useful:

source 'http://rubygems.org'

gem 'rails', '3.1.1'

# Bundle edge Rails instead:
# gem 'rails',     :git => 'git://github.com/rails/rails.git'

gem 'mysql2'

gem 'execjs'
gem 'therubyracer'

gem 'activeadmin'
gem 'meta_search', '>= 1.1.0.pre'

gem 'devise'

gem 'mogli'
gem 'ruby-hmac'
gem 'facebooker2'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.1.4'
  gem 'coffee-rails', '~> 3.1.1'
  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'

    group :test do
  # Pretty printed test output
  gem 'turn', :require => false
end

Thank you very much! :)


回答1:


Very strange. I switch off and on again my computer, and all seem to work now. Perhaps a session variable wrongly set? Weird.



来源:https://stackoverflow.com/questions/7812479/rails-fb-connect-async-js-provokes-500-error

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