Missing a constant on load.. how can i get around this? (Rails::Plugin::OpenID)
I have a Rails 2 project that I am trying to upgrade to Rails 3, but getting some issues with bundler.

When I run "rake", it runs the tests just fine.  But when I run "bundle exec rake" it fails to find a constant.

The error is this:

    /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/dependencies.rb:131:in `const_missing': uninitialized constant Rails::Plugin::OpenID (NameError)
    	from /Users/kimptoc/Documents/ruby/borisbikes/borisbikestats.pre3/vendor/plugins/open_id_authentication/init.rb:16:in `evaluate_init_rb'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:182:in `call'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:182:in `evaluate_method'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:166:in `call'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:90:in `run'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:90:in `each'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:90:in `send'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:90:in `run'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:276:in `run_callbacks'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/actionpack-2.3.9/lib/action_controller/dispatcher.rb:51:in `send'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/actionpack-2.3.9/lib/action_controller/dispatcher.rb:51:in `run_prepare_callbacks'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/rails-2.3.9/lib/initializer.rb:631:in `prepare_dispatcher'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/rails-2.3.9/lib/initializer.rb:185:in `process'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/rails-2.3.9/lib/initializer.rb:113:in `send'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/rails-2.3.9/lib/initializer.rb:113:in `run'
    	from /Users/kimptoc/Documents/ruby/borisbikes/borisbikestats.pre3/config/environment.rb:9
    	from ./test/test_helper.rb:2:in `require'
    	from ./test/test_helper.rb:2

I have these gems installed:

    $ gem list
    
    *** LOCAL GEMS ***
    
    actionmailer (2.3.9)
    actionpack (2.3.9)
    activerecord (2.3.9)
    activeresource (2.3.9)
    activesupport (2.3.9)
    authlogic (2.1.3)
    bundler (1.0.7)
    gravtastic (2.2.0)
    linecache (0.43)
    mocha (0.9.10)
    newrelic_rpm (2.13.4)
    parseexcel (0.5.2)
    rack (1.1.0)
    rack-openid (1.1.1)
    rails (2.3.9)
    rake (0.8.7)
    ruby-debug-base (0.10.5.jb2, 0.10.4)
    ruby-debug-ide (0.4.15)
    ruby-openid (2.1.8, 2.1.7, 2.0.4)
    sqlite3-ruby (1.3.2)

The bundler Gemfile is as follows:

    source 'http://rubygems.org'
    
    #gem 'rails', '3.0.3'
    gem "rails", "2.3.9"
    gem "activesupport", "2.3.9"
    gem "ruby-openid", "2.1.7", :require => "openid"
    #gem "authlogic-oid", "1.0.4"
    
    # Bundle edge Rails instead:
    # gem 'rails', :git => 'git://github.com/rails/rails.git'
    
    gem 'sqlite3-ruby', :require => 'sqlite3'
    
    gem "authlogic", "= 2.1.3"
    gem "newrelic_rpm"
    #  gem "facebooker"
    gem "parseexcel"
    gem 'gravtastic', '= 2.2.0'
    gem "rack-openid", '=1.1.1', :require => 'rack/openid'
    
    # not sure what this does...
    gem "mocha"

I have these plugins installed:

    2dc_jqgrid		
    authlogic_openid	
    open_id_authentication	
    squirrel

I see these similar questions:

http://stackoverflow.com/questions/4305538/missing-a-constant-on-load-how-can-i-get-around-this

and

http://stackoverflow.com/questions/3190499/requiring-gem-in-rails-3-controller-failing-with-constant-missing

But their solutions dont seem to work for my situation.

I am guessing the issue is around the plugins, but my ruby-foo is too weak.

Thanks in advance,
Chris

Missing a constant on load.. how can i get around this? (Rails::Plugin::OpenID)
===

I have a Rails 2 project that I am trying to upgrade to Rails 3, but getting some issues with bundler.

When I run "rake", it runs the tests just fine.  But when I run "bundle exec rake" it fails to find a constant.

The error is this:

    /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/dependencies.rb:131:in `const_missing': uninitialized constant Rails::Plugin::OpenID (NameError)
    	from /Users/kimptoc/Documents/ruby/borisbikes/borisbikestats.pre3/vendor/plugins/open_id_authentication/init.rb:16:in `evaluate_init_rb'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:182:in `call'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:182:in `evaluate_method'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:166:in `call'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:90:in `run'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:90:in `each'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:90:in `send'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:90:in `run'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:276:in `run_callbacks'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/actionpack-2.3.9/lib/action_controller/dispatcher.rb:51:in `send'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/actionpack-2.3.9/lib/action_controller/dispatcher.rb:51:in `run_prepare_callbacks'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/rails-2.3.9/lib/initializer.rb:631:in `prepare_dispatcher'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/rails-2.3.9/lib/initializer.rb:185:in `process'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/rails-2.3.9/lib/initializer.rb:113:in `send'
    	from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/rails-2.3.9/lib/initializer.rb:113:in `run'
    	from /Users/kimptoc/Documents/ruby/borisbikes/borisbikestats.pre3/config/environment.rb:9
    	from ./test/test_helper.rb:2:in `require'
    	from ./test/test_helper.rb:2

I have these gems installed:

    $ gem list
    
    *** LOCAL GEMS ***
    
    actionmailer (2.3.9)
    actionpack (2.3.9)
    activerecord (2.3.9)
    activeresource (2.3.9)
    activesupport (2.3.9)
    authlogic (2.1.3)
    bundler (1.0.7)
    gravtastic (2.2.0)
    linecache (0.43)
    mocha (0.9.10)
    newrelic_rpm (2.13.4)
    parseexcel (0.5.2)
    rack (1.1.0)
    rack-openid (1.1.1)
    rails (2.3.9)
    rake (0.8.7)
    ruby-debug-base (0.10.5.jb2, 0.10.4)
    ruby-debug-ide (0.4.15)
    ruby-openid (2.1.8, 2.1.7, 2.0.4)
    sqlite3-ruby (1.3.2)

The bundler Gemfile is as follows:

    source 'http://rubygems.org'
    
    #gem 'rails', '3.0.3'
    gem "rails", "2.3.9"
    gem "activesupport", "2.3.9"
    gem "ruby-openid", "2.1.7", :require => "openid"
    #gem "authlogic-oid", "1.0.4"
    
    # Bundle edge Rails instead:
    # gem 'rails', :git => 'git://github.com/rails/rails.git'
    
    gem 'sqlite3-ruby', :require => 'sqlite3'
    
    gem "authlogic", "= 2.1.3"
    gem "newrelic_rpm"
    #  gem "facebooker"
    gem "parseexcel"
    gem 'gravtastic', '= 2.2.0'
    gem "rack-openid", '=1.1.1', :require => 'rack/openid'
    
    # not sure what this does...
    gem "mocha"

I have these plugins installed:

    2dc_jqgrid		
    authlogic_openid	
    open_id_authentication	
    squirrel

I see these similar questions:

http://stackoverflow.com/questions/4305538/missing-a-constant-on-load-how-can-i-get-around-this

and

http://stackoverflow.com/questions/3190499/requiring-gem-in-rails-3-controller-failing-with-constant-missing

But their solutions dont seem to work for my situation.

I am guessing the issue is around the plugins, but my ruby-foo is too weak.

Thanks in advance,
Chris
