Rails 3.0.0.beta and Facebooker: anyone else seeing the following?

天大地大妈咪最大 提交于 2019-12-12 11:56:42

问题


My rails server seems to break after installing the facebooker plugin. Any suggestions on fixing this would be great.

I'm using rails 3.0.0.beta and facebooker.

Here are the steps and the error that I'm seeing:

$ rails -v
Rails 3.0.0.beta
$ rails break; cd break
$ ./script/rails plugin install git://github.com/mmangino/facebooker.git
$ vim Rakefile #and add "require 'tasks/facebooker'"

$ ./script/rails server
=> Booting WEBrick
=> Rails 3.0.0.beta application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:456:in `load_missing_constant': uninitialized constant ActiveSupport::CoreExtensions (NameError)
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:91:in `const_missing'
    from /path/break/vendor/plugins/facebooker/lib/facebooker/adapters/adapter_base.rb:6
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:537:in `new_constants_in'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require'
    from /path/break/vendor/plugins/facebooker/lib/facebooker.rb:252
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:537:in `new_constants_in'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require'
    from /path/break/vendor/plugins/facebooker/rails/../init.rb:5
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:537:in `new_constants_in'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require'
    from /path/break/vendor/plugins/facebooker/rails/init.rb:1
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.0.beta/lib/rails/plugin.rb:49
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.0.beta/lib/rails/initializable.rb:25:in `instance_exec'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.0.beta/lib/rails/initializable.rb:25:in `run'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.0.beta/lib/rails/initializable.rb:55:in `run_initializers'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.0.beta/lib/rails/initializable.rb:54:in `each'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.0.beta/lib/rails/initializable.rb:54:in `run_initializers'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.0.beta/lib/rails/application.rb:71:in `initialize!'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.0.beta/lib/rails/application.rb:41:in `send'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.0.beta/lib/rails/application.rb:41:in `method_missing'
    from /path/break/config/environment.rb:5
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:537:in `new_constants_in'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require'
    from config.ru:3
    from /Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval'
    from /Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize'
    from config.ru:1:in `new'
    from config.ru:1

回答1:


Facebooker is known not to work with Rails 3, which is not backwards-compatible.

See http://railsplugins.org for any future such inquiries until Rails 3 is mainstream.

Sounds like, sadly, Facebook apps will have to use Rails 2 until Facebooker becomes compatible.




回答2:


There are lots of rails3 forked branches out there: e.g. http://github.com/joren/facebooker/commits/rails3

they work just fine.




回答3:


This one works with Rails3 and the new facebook api: http://github.com/funkensturm/facebooker-rails3

but it is very experimental and doesn't include the test etc.



来源:https://stackoverflow.com/questions/2368389/rails-3-0-0-beta-and-facebooker-anyone-else-seeing-the-following

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