我正在尝试在我的机器上安装fedena,当我尝试运行rake fedena时,我有正确版本的ruby和宝石:插件:install_all它不起作用,对此有任何帮助吗?
➜ fedena-v2.3-bundle-linux git:(master) ✗ rake fedena:plugins:install_all
(in /home/dexter/Apps/fedena-v2.3-bundle-linux)
rake aborted!
uninitialized constant Authorization
(See full trace by running task with --trace)
➜ fedena-v2.3-bundle-linux git:(master) ✗ rake fedena:plugins:install_all --trace
(in /home/dexter/Apps/fedena-v2.3-bundle-linux)
** Invoke fedena:plugins:install_all (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
uninitialized constant Authorization
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:443:in `load_missing_constant'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/declarative_authorization-0.5.1/config/routes.rb:5
/home/dexter/Apps/fedena-v2.3-bundle-linux/vendor/plugins/fckeditor/init.rb:27:in `draw'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/actionpack-2.3.5/lib/action_controller/routing/route_set.rb:226:in `draw_without_fckeditor'
/home/dexter/Apps/fedena-v2.3-bundle-linux/vendor/plugins/fckeditor/init.rb:23:in `draw'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/declarative_authorization-0.5.1/config/routes.rb:4
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load_without_new_constant_marking'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/actionpack-2.3.5/lib/action_controller/routing/route_set.rb:286:in `load_routes!'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/actionpack-2.3.5/lib/action_controller/routing/route_set.rb:286:in `each'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/actionpack-2.3.5/lib/action_controller/routing/route_set.rb:286:in `load_routes!'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/actionpack-2.3.5/lib/action_controller/routing/route_set.rb:266:in `reload!'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/actionpack-2.3.5/lib/action_controller/routing.rb:381:in `inflections'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/core_ext/object/misc.rb:39:in `returning'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/actionpack-2.3.5/lib/action_controller/routing.rb:380:in `inflections'
/home/dexter/Apps/fedena-v2.3-bundle-linux/config/initializers/inflections.rb:5
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load_without_new_constant_marking'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:622:in `load_application_initializers'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:621:in `each'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:621:in `load_application_initializers'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:176:in `process'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
/home/dexter/Apps/fedena-v2.3-bundle-linux/config/environment.rb:6
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/tasks/misc.rake:4
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/home/dexter/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/home/dexter/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/bin/rake:31
/home/dexter/.rvm/gems/ruby-1.8.7-p302/bin/rake:19:in `load'
/home/dexter/.rvm/gems/ruby-1.8.7-p302/bin/rake:19
/home/dexter/.rvm/gems/ruby-1.8.7-p302/bin/ruby_noexec_wrapper:14
答案 0 :(得分:3)
在config/boot.rb
之前 Rails.boot!
解决初始化程序问题需要以下几行
class Rails::Boot
def run
load_initializer
Rails::Initializer.class_eval do
def load_gems
@bundler_loaded ||= Bundler.require :default, Rails.env
end
end
Rails::Initializer.run(:set_load_path)
end
end