Rails 3 Development mode crashes after the first usage of ImageMagick #13

Closed
bf4 opened this Issue Jul 24, 2014 · 5 comments

Comments

Projects
None yet
4 participants
@bf4
Member

bf4 commented Jul 24, 2014

Issue by jeffdeville
Saturday Jan 08, 2011 at 06:10 GMT
Originally opened as #22


The error message is:
cannot remove Object::Version

I think what's happening is that in development mode, Rails tries to clear itself, and reload the environment somewhat after each page. It's this process that is dying. (The code that actually manipulates my image works, and setting cache_classes: true avoids the problem, but makes it necessary to restart my development server constantly.

Stacktrace:

activesupport (3.0.3) lib/active_support/dependencies.rb:645:in `remove_const'
activesupport (3.0.3) lib/active_support/dependencies.rb:645:in `remove_constant'
activesupport (3.0.3) lib/active_support/dependencies.rb:645:in `instance_eval'
activesupport (3.0.3) lib/active_support/dependencies.rb:645:in `remove_constant'
activesupport (3.0.3) lib/active_support/dependencies.rb:521:in `remove_unloadable_constants!'
activesupport (3.0.3) lib/active_support/dependencies.rb:521:in `each'
activesupport (3.0.3) lib/active_support/dependencies.rb:521:in `remove_unloadable_constants!'
activesupport (3.0.3) lib/active_support/dependencies.rb:317:in `clear'
railties (3.0.3) lib/rails/application/bootstrap.rb:60:in `_callback_after_7'
activesupport (3.0.3) lib/active_support/callbacks.rb:419:in `_run_call_callbacks'
actionpack (3.0.3) lib/action_dispatch/middleware/callbacks.rb:44:in `call'
rack (1.2.1) lib/rack/sendfile.rb:107:in `call'
actionpack (3.0.3) lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
actionpack (3.0.3) lib/action_dispatch/middleware/show_exceptions.rb:46:in `call'
railties (3.0.3) lib/rails/rack/logger.rb:13:in `call'
rack (1.2.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.0.3) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.2.1) lib/rack/lock.rb:11:in `call'
rack (1.2.1) lib/rack/lock.rb:11:in `synchronize'
rack (1.2.1) lib/rack/lock.rb:11:in `call'
actionpack (3.0.3) lib/action_dispatch/middleware/static.rb:30:in `call'
railties (3.0.3) lib/rails/application.rb:168:in `call'
railties (3.0.3) lib/rails/application.rb:77:in `send'
railties (3.0.3) lib/rails/application.rb:77:in `method_missing'
railties (3.0.3) lib/rails/rack/log_tailer.rb:14:in `call'
rack (1.2.1) lib/rack/content_length.rb:13:in `call'
rack (1.2.1) lib/rack/handler/webrick.rb:52:in `service'
/Volumes/files/jeffdeville/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/Volumes/files/jeffdeville/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/Volumes/files/jeffdeville/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/Volumes/files/jeffdeville/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/webrick/server.rb:162:in `start'
/Volumes/files/jeffdeville/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/Volumes/files/jeffdeville/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/webrick/server.rb:95:in `start'
/Volumes/files/jeffdeville/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/webrick/server.rb:92:in `each'
/Volumes/files/jeffdeville/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/webrick/server.rb:92:in `start'
/Volumes/files/jeffdeville/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/webrick/server.rb:23:in `start'
/Volumes/files/jeffdeville/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/webrick/server.rb:82:in `start'
rack (1.2.1) lib/rack/handler/webrick.rb:13:in `run'
rack (1.2.1) lib/rack/server.rb:213:in `start'
railties (3.0.3) lib/rails/commands/server.rb:65:in `start'
railties (3.0.3) lib/rails/commands.rb:30
railties (3.0.3) lib/rails/commands.rb:27:in `tap'
railties (3.0.3) lib/rails/commands.rb:27
script/rails:6:in `require'
script/rails:6
@bf4

This comment has been minimized.

Show comment Hide comment
@bf4

bf4 Jul 24, 2014

Member

Comment by wfwalker
Sunday Aug 28, 2011 at 15:49 GMT


I'm pretty sure I saw the same problem with ruby 1.8.7 and rails 2.3.11:

[2011-08-28 08:46:05] ERROR NameError: cannot remove Object::Version
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:633:in `remove_const'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:633:in `remove_constant'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:633:in `instance_eval'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:633:in `remove_constant'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:480:in `remove_unloadable_constants!'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:480:in `each'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:480:in `remove_unloadable_constants!'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:266:in `clear'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:64:in `cleanup_application'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/actionpack-2.3.11/lib/action_controller/reloader.rb:17:in `close'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/rack-1.1.2/lib/rack/handler/webrick.rb:64:in `service'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:162:in `start'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:95:in `start'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:92:in `each'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:92:in `start'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:23:in `start'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:82:in `start'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/rack-1.1.2/lib/rack/handler/webrick.rb:14:in `run'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/rails-2.3.11/lib/commands/server.rb:111
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'

removing the require 'RMagick' and include Magick from my model class made the problem go away, I think

Member

bf4 commented Jul 24, 2014

Comment by wfwalker
Sunday Aug 28, 2011 at 15:49 GMT


I'm pretty sure I saw the same problem with ruby 1.8.7 and rails 2.3.11:

[2011-08-28 08:46:05] ERROR NameError: cannot remove Object::Version
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:633:in `remove_const'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:633:in `remove_constant'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:633:in `instance_eval'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:633:in `remove_constant'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:480:in `remove_unloadable_constants!'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:480:in `each'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:480:in `remove_unloadable_constants!'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:266:in `clear'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:64:in `cleanup_application'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/actionpack-2.3.11/lib/action_controller/reloader.rb:17:in `close'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/rack-1.1.2/lib/rack/handler/webrick.rb:64:in `service'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:162:in `start'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:95:in `start'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:92:in `each'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:92:in `start'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:23:in `start'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:82:in `start'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/rack-1.1.2/lib/rack/handler/webrick.rb:14:in `run'
    /Users/walker/.rvm/gems/ruby-1.8.7-p334/gems/rails-2.3.11/lib/commands/server.rb:111
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    /Users/walker/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'

removing the require 'RMagick' and include Magick from my model class made the problem go away, I think

@vassilevsky

This comment has been minimized.

Show comment Hide comment
@vassilevsky

vassilevsky Mar 26, 2015

Member

@jeffdeville @wfwalker hello :) Is this problem still around? Rails has seen many new versions and RMagick has been updated too.

Member

vassilevsky commented Mar 26, 2015

@jeffdeville @wfwalker hello :) Is this problem still around? Rails has seen many new versions and RMagick has been updated too.

@wfwalker

This comment has been minimized.

Show comment Hide comment
@wfwalker

wfwalker Mar 26, 2015

Hi @vassilevsky thanks for asking, I'm not seeing this problem any more. I'm happy to see this get closed and then file a new issue if it comes back.

Hi @vassilevsky thanks for asking, I'm not seeing this problem any more. I'm happy to see this get closed and then file a new issue if it comes back.

@jeffdeville

This comment has been minimized.

Show comment Hide comment
@jeffdeville

jeffdeville Mar 26, 2015

Yeah, just close it at this point. I'm sure someone will let you know if it's still an issue.

Yeah, just close it at this point. I'm sure someone will let you know if it's still an issue.

@vassilevsky

This comment has been minimized.

Show comment Hide comment
@vassilevsky

vassilevsky Mar 26, 2015

Member

👍

Member

vassilevsky commented Mar 26, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment