2014-04-04 24 views
0

我的遷移有一個非常煩人的問題。耙子中止!未初始化的常量Bullet

首先ERRORMESSAGE:

rake db:migrate --trace 
/usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake/alt_system.rb:32:in `<module:AltSystem>': Use RbConfig instead of obsolete and deprecated Config. 
/usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake/alt_system.rb:32:in `<module:AltSystem>': Use RbConfig instead of obsolete and deprecated Config. 
/usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:960:in `<module:FileUtils>': Use RbConfig instead of obsolete and deprecated Config. 
/usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:962:in `<module:FileUtils>': Use RbConfig instead of obsolete and deprecated Config. 
/usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:965:in `<module:FileUtils>': Use RbConfig instead of obsolete and deprecated Config. 
/usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:966:in `<module:FileUtils>': Use RbConfig instead of obsolete and deprecated Config. 
(in /Users/agstwn/Documents/WORK/hq_git/PS) 
syck has been removed, psych is used instead 
** Invoke db:migrate (first_time) 
** Invoke environment (first_time) 
** Execute environment 
rake aborted! 
uninitialized constant Bullet 

這裏是我的--trace:

/config/initializers/const_missing.rb:12:in `const_missing_with_csv_export' 
    /config/environments/development.rb:49:in `block (2 levels) in <top (required)>' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/activesupport-3.2.17/lib/active_support/lazy_load_hooks.rb:34:in `call' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/activesupport-3.2.17/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/activesupport-3.2.17/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/activesupport-3.2.17/lib/active_support/lazy_load_hooks.rb:42:in `each' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/activesupport-3.2.17/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/railties-3.2.17/lib/rails/application/finisher.rb:59:in `block in <module:Finisher>' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `instance_exec' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `run' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/railties-3.2.17/lib/rails/initializable.rb:55:in `block in run_initializers' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `each' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `run_initializers' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/railties-3.2.17/lib/rails/application.rb:136:in `initialize!' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/railties-3.2.17/lib/rails/railtie/configurable.rb:30:in `method_missing' 
    /Users/agstwn/Documents/WORK/hq_git/PS/config/environment.rb:12:in `<top (required)>' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/railties-3.2.17/lib/rails/application.rb:103:in `require_environment!' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/railties-3.2.17/lib/rails/application.rb:305:in `block (2 levels) in initialize_tasks' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:636:in `call' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:636:in `block in execute' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:631:in `each' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:631:in `execute' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:597:in `block in invoke_with_call_chain' 
    /usr/local/rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:607:in `block in invoke_prerequisites' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:604:in `each' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:596:in `block in invoke_with_call_chain' 
    /usr/local/rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:2029:in `block (2 levels) in top_level' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:2029:in `each' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:2029:in `block in top_level' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:2001:in `block in run' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/lib/rake.rb:1998:in `run' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/gems/rake-0.8.7/bin/rake:31:in `<top (required)>' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/bin/rake:23:in `load' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/bin/rake:23:in `<main>' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/bin/ruby_executable_hooks:15:in `eval' 
    /usr/local/rvm/gems/ruby-2.0.0-p451/bin/ruby_executable_hooks:15:in `<main>' 

我有這個不知道,我有搜索,但我無法找到它。也許你們現在談論這個?

/config/initializers/const_missing.rb

class << Object 

    def const_missing_with_csv_export(name) 
    if name.to_s =~ /^(?<resource_name_camelcase>.+)Csv(?:Import|Export)(?:Log|Job)/ 
     const_get $~['resource_name_camelcase'] + 'Controller' 
     const_get name 
    else 
     const_missing_without_csv_export(name) 
    end 
    end 

    alias_method_chain :const_missing, :csv_export 
end 
+0

子彈是幫助確定何時有效地使用急切加載的寶石。 在初始化程序或任何環境文件中是否有與Bullet相關的任何代碼? –

+0

這個文件有什麼? 'config/environment.rb'(特別是第12行)你有沒有提到Bullet?如果是這樣,你是否安裝了Bullet gem? –

+0

我沒有在environment.rb中提到它,但我已經安裝了子彈寶石。 – agstwn21

回答

0

當我運行捆綁安裝之前我已經修復與

uninitialized constant Bullet 

的問題,在發展中其說寶玉不安裝 重新運行bundle安裝。確保我的子彈寶石安裝。

相關問題