markevans/dragonfly — Issue #136: ArgumentError: Dragonfly is not missing constant Config!
Author: ugisozols
Created: 2011-10-14 14:13:11+00:00
State: open

windows + jruby

Originally this issue was reported [here](https://github.com/resolve/refinerycms/issues/967) but I can reproduce it by adding initializer (require 'dragonfly/rails/images') to clean rails app and it'll still fail.

````
C:\testy>rails s
=> Booting WEBrick
=> Rails 3.0.10 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
ArgumentError: Dragonfly is not missing constant Rails!
load_missing_constant at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:479
const_missing at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:183
each at org/jruby/RubyArray.java:1603
const_missing at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:181
__singleton__ at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/dragonfly-0.9.8/lib/dragonfly.rb:52
call at org/jruby/RubyProc.java:274
call at org/jruby/RubyProc.java:229
saved_config_for at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/dragonfly-0.9.8/lib/dragonfly/configurable.rb:117
configure_with at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/dragonfly-0.9.8/lib/dragonfly/configurable.rb:40
(root) at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/dragonfly-0.9.8/lib/dragonfly/rails/images.rb:14
require at org/jruby/RubyKernel.java:1038
require at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239
load_dependency at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:225
new_constants_in at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:593
new_constants_in at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:592
load_dependency at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:225
require at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239
(root) at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/dragonfly-0.9.8/lib/dragonfly/rails/images.rb:1
load at org/jruby/RubyKernel.java:1063
load at C:/testy/config/initializers/dragonfly.rb:235
load_dependency at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:225
new_constants_in at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:593
new_constants_in at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:592
load_dependency at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:225
load at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:235
Engine at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/engine.rb:201
each at org/jruby/RubyArray.java:1603
Engine at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/engine.rb:200
instance_exec at org/jruby/RubyKernel.java:2078
run at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/initializable.rb:25
run_initializers at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/initializable.rb:50
each at org/jruby/RubyArray.java:1603
run_initializers at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/initializable.rb:49
initialize! at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/application.rb:134
send at org/jruby/RubyKernel.java:2092
method_missing at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/application.rb:77
(root) at C:/testy/config/environment.rb:5
require at org/jruby/RubyKernel.java:1038
parse_file at C:/testy/config/environment.rb:3
instance_eval at org/jruby/RubyKernel.java:2061
initialize at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/rack-1.2.4/lib/rack/builder.rb:46
parse_file at C:/testy/config.ru:1
eval at org/jruby/RubyKernel.java:1088
parse_file at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/rack-1.2.4/lib/rack/builder.rb:35
app at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/rack-1.2.4/lib/rack/server.rb:162
wrapped_app at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/rack-1.2.4/lib/rack/server.rb:253
start at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/rack-1.2.4/lib/rack/server.rb:204
start at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/commands/server.rb:65
(root) at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/commands.rb:30
tap at org/jruby/RubyKernel.java:1803
(root) at C:/jruby-1.6.4/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/commands.rb:27
require at org/jruby/RubyKernel.java:1038
(root) at script/rails:6
````