Ошибка Heroku - ошибка устаревания, приложение перестало работать.

Я отправил свой последний код, а затем мое приложение heroku перестало работать. Я проверил журналы и получил сообщение об ошибке. Есть ли определенные драгоценные камни, которые я должен удалить? Это ошибка БД?

DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-05-23T00:08:04+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-05-23T00:08:11+00:00 app[web.1]: /app/app/controllers/admin/users_controller.rb:1:in `<top (required)>': superclass mismatch for class UsersController (TypeError)

Я запустил heroku run rake db:migrate на случай, если проблема была в этом, и получил похожее предупреждение:

DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
/app/app/controllers/admin/users_controller.rb:1:in `<top (required)>': superclass mismatch for class UsersController (TypeError)
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:359:in `require_or_load'
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:313:in `depend_on'
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:225:in `require_dependency'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/engine.rb:438:in `each'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/engine.rb:438:in `block in eager_load!'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/engine.rb:436:in `each'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/engine.rb:436:in `eager_load!'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `instance_exec'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `run'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `each'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `run_initializers'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/application.rb:136:in `initialize!'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /app/config/environment.rb:5:in `<top (required)>'
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/application.rb:103:in `require_environment!'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/commands.rb:40:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

Вот мой Gemfile:

source 'https://rubygems.org'

gem 'rails', '3.2.3'
gem 'bootstrap-sass', '2.0.0'
gem 'omniauth'
gem 'omniauth-facebook'
gem 'omniauth-twitter'
gem 'omniauth-oauth'
gem 'devise'
gem 'cancan'
gem 'paperclip'
gem 'canard'
gem 'activeadmin'
gem 'acts_as_tree'
gem 'formtastic'


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



group :development, :test do
gem 'sqlite3'
gem 'nifty-generators'
end

group :production do
  gem 'pg'
  gem 'thin'
end


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platform => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

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

# To use Jbuilder templates for JSON
# gem 'jbuilder'

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

# Deploy with Capistrano
# gem 'capistrano'

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

Есть ли определенные драгоценные камни, которые я должен удалить?


person william tell    schedule 23.05.2012    source источник
comment
опубликовать строку 5 из app/config/environment.rb   -  person RadBrad    schedule 23.05.2012
comment
Это строка 5 файла environment.rb: App_name::Application.initialize!   -  person william tell    schedule 23.05.2012


Ответы (1)


Здесь происходит две вещи: ПРЕДУПРЕЖДЕНИЕ об устаревании и ошибка. Ошибка

/app/app/controllers/admin/users_controller.rb:1:in `<top (required)>': superclass mismatch for class UsersController (TypeError)

superclass mismatch for class UsersController Обычно это означает, что вы используете имя, которое уже использовалось. Мое первое предположение будет заключаться в том, что у вас есть UsersController в папке администратора и в папке корневых контроллеров, но это всего лишь предположение. В любом случае вы получаете сообщение об ошибке при вызове суперкласса.

Предупреждение об устаревании не должно вызывать никаких проблем, просто предупреждение об изменении этого кода для будущих версий Rails.

person Alex Marchant    schedule 23.05.2012
comment
Была такая же проблема. У меня было два users_controller либо в корневой папке контроллера, либо admin. - person microspino; 12.04.2013