我是heroku的新用户,我正在尝试在heroku上部署应用程序。我得到了以下错误。应用程序是在Rail 4.1.5中构建的,我正在使用mongoid,我正在使用mongolab添加heroku
remote: Running: rake assets:precompile
remote: rake aborted!
remote: NoMethodError: undefined method `active_record' for #<Rails::Application::Configuration:0x007fddc83c9080>
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/railtie/configuration.rb:95:in `method_missing'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/config/environments/production.rb:81:in `block in <top (required)>'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/railtie.rb:210:in `instance_eval'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/railtie.rb:210:in `configure'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/config/environments/production.rb:1:in `<top (required)>'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `block in require'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/engine.rb:594:in `block (2 levels) in <class:Engine>'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/engine.rb:593:in `each'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/engine.rb:593:in `block in <class:Engine>'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/initializable.rb:30:in `instance_exec'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/initializable.rb:30:in `run'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/initializable.rb:55:in `block in run_initializers'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/initializable.rb:44:in `each'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/initializable.rb:44:in `tsort_each_child'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/initializable.rb:54:in `run_initializers'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/application.rb:300:in `initialize!'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/config/environment.rb:5:in `<top (required)>'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/application.rb:276:in `require'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/application.rb:276:in `require_environment!'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/application.rb:379:in `block in run_tasks_blocks'
remote: /tmp/build_858cf4853394f7ea607169cfc9da45c7/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.2.2/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
remote: Tasks: TOP => environment
remote: (See full trace by running task with --trace)
remote: !
remote: ! Precompiling assets failed.
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
答案 0 :(得分:0)
您的stacktrace显示问题与sprockets gem有关。您确定要设置配置以充分摆脱ActiveRecord吗?仔细检查here。
您可能需要在require "sprockets/railtie"
中注明config/application.rb
。