0

my app on heroku is given the Application Error. Here is the logs:

2013-06-26T01:11:29.361666+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)
2013-06-26T01:11:29.361401+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)
2013-06-26T01:11:32.327019+00:00 app[web.1]: => Booting WEBrick
2013-06-26T01:11:32.327019+00:00 app[web.1]: => Rails 3.2.13 application starting in production on http://0.0.0.0:53357
2013-06-26T01:11:32.327019+00:00 app[web.1]: => Call with -d to detach
2013-06-26T01:11:32.327019+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-06-26T01:11:32.327019+00:00 app[web.1]: Exiting
2013-06-26T01:11:32.327988+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- devise/orm/active_record (LoadError)
2013-06-26T01:11:32.327988+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-06-26T01:11:32.327988+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-06-26T01:11:32.327988+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-06-26T01:11:32.327988+00:00 app[web.1]:    from /app/config/initializers/devise.rb:1:in `<top (required)>'
2013-06-26T01:11:32.327988+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
2013-06-26T01:11:32.327988+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `block in load'
2013-06-26T01:11:32.327988+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-06-26T01:11:32.327988+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
2013-06-26T01:11:32.328166+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:587:in `each'
2013-06-26T01:11:32.328166+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:587:in `block in <class:Engine>'
2013-06-26T01:11:32.327988+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
2013-06-26T01:11:32.328166+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
2013-06-26T01:11:32.328166+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
2013-06-26T01:11:32.328166+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
2013-06-26T01:11:32.328166+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-06-26T01:11:32.328166+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
2013-06-26T01:11:32.328166+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-06-26T01:11:32.328166+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
2013-06-26T01:11:32.328166+00:00 app[web.1]:    from /app/config/environment.rb:5:in `<top (required)>'
2013-06-26T01:11:32.328337+00:00 app[web.1]:    from /app/config.ru:3:in `require'
2013-06-26T01:11:32.328337+00:00 app[web.1]:    from /app/config.ru:3:in `block in <main>'
2013-06-26T01:11:32.328337+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-06-26T01:11:32.328337+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-06-26T01:11:32.328337+00:00 app[web.1]:    from /app/config.ru:in `new'
2013-06-26T01:11:32.328337+00:00 app[web.1]:    from /app/config.ru:in `<main>'
2013-06-26T01:11:32.328337+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
2013-06-26T01:11:32.328337+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
2013-06-26T01:11:32.328337+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
2013-06-26T01:11:32.328337+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
2013-06-26T01:11:32.328770+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2013-06-26T01:11:32.328770+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
2013-06-26T01:11:32.328770+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
2013-06-26T01:11:32.328770+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-06-26T01:11:32.328770+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
2013-06-26T01:11:32.328770+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
2013-06-26T01:11:32.328770+00:00 app[web.1]:    from script/rails:6:in `require'
2013-06-26T01:11:32.328770+00:00 app[web.1]:    from script/rails:6:in `<main>'
2013-06-26T01:11:33.739784+00:00 heroku[web.1]: State changed from starting to crashed
2013-06-26T01:11:33.737535+00:00 heroku[web.1]: Process exited with status 1
2013-06-26T01:13:34.565799+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=cuica.herokuapp.com fwd="177.158.207.226" dyno= connect= service= status=503 bytes=
2013-06-26T01:13:35.001732+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=cuica.herokuapp.com fwd="177.158.207.226" dyno= connect= service= status=503 bytes=

here's my gemfile:

source 'https://rubygems.org'
ruby '1.9.3'

gem 'rails', '3.2.13'
gem 'jquery-rails', '2.0.2'
gem 'haml-rails'
gem 'bcrypt-ruby', '~> 3.0.0'

group :development, :test do
  gem 'sqlite3', '1.3.5'
  gem 'rspec-rails', '2.11.0'
end

group :development do
  gem 'better_errors'
  gem 'binding_of_caller'
end

group :assets do
  gem 'sass-rails',   '3.2.5'
  gem 'coffee-rails', '3.2.2'
  gem 'uglifier', '1.2.3'
  gem 'zurb-foundation', '~> 4.0.0'
end

group :test do
  gem 'capybara', '1.1.2'
end

group :production do
  gem 'pg'
end

I don't know what to do. I search but don't found some gem to improve the logs errors like better_erros gem for local. Is there any similar gem avaible? anyway, I need to solve this big problem! please, give me light! thanks!

kinguerra
  • 85
  • 1
  • 1
  • 6

1 Answers1

0

What happens is that when your application is being ran in production mode does not respond to 'devise' method. This can usually mean you haven't loaded your ORM file or it's being loaded too late. To fix it, be sure to require 'devise/orm/active_record' inside 'config/initializers/devise.rb' or before your application definition in 'config/application.rb' (RuntimeError).

So you should have the following in your devise.rb

# ==> ORM configuration
  # Load and configure the ORM. Supports :active_record (default) and
  # :mongoid (bson_ext recommended) by default. Other ORMs may be
  # available as additional gems.
  require 'devise/orm/active_record'

And is it just me. I believe I don't see the gem 'devise' in your gemfile! No wonder why potentially this is throwing an error.

Deej
  • 5,334
  • 12
  • 44
  • 68
  • Oh god! I deleted devise and its dependencies (or at least I believed). I am no longer using it, how do I completely remove his remains? – kinguerra Jun 26 '13 at 02:14
  • You can do either the two `gem uninstall devise` and you can then do `gem cleanup`. You can list the dependency by doing `gem dependency devise` which will list your dependencies, and you can work out what you need to remove. When you do add devise back in I suggest adding the following in your gemfile `gem 'devise', :git => 'https://github.com/plataformatec/devise.git'` – Deej Jun 26 '13 at 02:16
  • oh god, it's saying that I don't have write permissions on rvm/gems directory! – kinguerra Jun 26 '13 at 02:24
  • Take a look at - http://stackoverflow.com/questions/11092690/rvm-gem-permissions-error – Deej Jun 26 '13 at 02:26