acts_as_taggable_on environment issues

Like most people, I've got two machines: one for development and one for production. I've done everything I can to make sure the ruby/rails environments are the same, but of course they're not identical (I'll get into that in a moment). The error that I'm getting happens when I call a method in a background task controller on the production machine; I have tried running the command on the production instance itself as well as a development instance checked out from source control (so running in the development Rails environment, but on the production box). Here's what I'm seeing:

whisper:tidbitz mark$ ./script/runner BackgroundController.sendEmailNotifications /Users/mark/Documents/Feedback Games/development/tidbitz/vendor/rails/ railties/lib/commands/runner.rb:47: /Users/mark/Documents/Feedback Games/development/tidbitz/vendor/rails/activerecord/lib/active_record/ base.rb:1667:in `method_missing_without_paginate': undefined method `acts_as_taggable_on' for #<Class:0x20e1f08> (NoMethodError)   from /Library/Ruby/Gems/1.8/gems/mislav-will_paginate-2.3.4/lib/ will_paginate/finder.rb:164:in `method_missing'   from /Users/mark/Documents/Feedback Games/development/tidbitz/app/ models/tidbit.rb:3   from /Users/mark/Documents/Feedback Games/development/tidbitz/vendor/ rails/activerecord/lib/../../activesupport/lib/active_support/ dependencies.rb:215:in `load_without_new_constant_marking'   from /Users/mark/Documents/Feedback Games/development/tidbitz/vendor/ rails/activerecord/lib/../../activesupport/lib/active_support/ dependencies.rb:215:in `load_file'   from /Users/mark/Documents/Feedback Games/development/tidbitz/vendor/ rails/activerecord/lib/../../activesupport/lib/active_support/ dependencies.rb:354:in `new_constants_in'   from /Users/mark/Documents/Feedback Games/development/tidbitz/vendor/ rails/activerecord/lib/../../activesupport/lib/active_support/ dependencies.rb:214:in `load_file'   from /Users/mark/Documents/Feedback Games/development/tidbitz/vendor/ rails/activerecord/lib/../../activesupport/lib/active_support/ dependencies.rb:95:in `require_or_load'   from /Users/mark/Documents/Feedback Games/development/tidbitz/vendor/ rails/activerecord/lib/../../activesupport/lib/active_support/ dependencies.rb:260:in `load_missing_constant'    ... 21 levels...   from ./script/runner:3:in `eval'   from /Users/mark/Documents/Feedback Games/development/tidbitz/vendor/ rails/railties/lib/commands/runner.rb:47   from ./script/runner:3:in `require'   from ./script/runner:3

Here are the things that I know are the same on both machines: - Rails has been frozen in vendor/ at version 2.1.0 - In vendor/plugins I have two plugins, facebooker and mysql_bigint - I've got the following gems in vendor/gems: mbleigh-acts-as-taggable- on-1.0.2 and mislav-will_paginate-2.3.4 - Both machines have RubyGems 1.3.0 - Both machines are running MacOS X 10.5.5 with the latest security updates.

Here are the things I know are different on the machines: - Hardware     - production: mac mini, dual core Intel     - development: macbook pro, dual core Intel

- Ruby 1.8.6 patch level:     - production: ruby 1.8.6 (2008-03-03 patchlevel 114) [universal- darwin9.0]     - development: ruby 1.8.6 (2007-09-24 patchlevel 111) [i686- darwin9.0.0]

- Installed Gems

===== Production Gems installed ====== whisper:tidbitz mark$ gem list --local

*** LOCAL GEMS ***

actionmailer (2.1.1, 2.1.0, 2.0.2, 1.3.6, 1.3.3) actionpack (2.1.1, 2.1.0, 2.0.2, 1.13.6, 1.13.3) actionwebservice (1.2.6, 1.2.3) activerecord (2.1.1, 2.1.0, 2.0.2, 1.15.6, 1.15.3) activeresource (2.1.1, 2.1.0, 2.0.2) activesupport (2.1.1, 2.1.0, 2.0.2, 1.4.4, 1.4.2) acts_as_ferret (0.4.3, 0.4.1) capistrano (2.5.0, 2.1.0, 2.0.0) cgi_multipart_eof_fix (2.5.0, 2.2) daemons (1.0.10, 1.0.9, 1.0.7) dnssd (0.7.0, 0.6.0) fastthread (1.0.1, 1.0) fcgi (0.8.7) ferret (0.11.6, 0.11.4) gem_plugin (0.2.3, 0.2.2) highline (1.4.0, 1.2.9) hpricot (0.6.161, 0.6) libxml-ruby (0.8.3, 0.5.2.0, 0.3.8.4) mbleigh-acts-as-taggable-on (1.0.2) mislav-will_paginate (2.3.4) mongrel (1.1.5, 1.1.4, 1.1.3, 1.0.1) mongrel_cluster (1.0.5) needle (1.3.0) net-sftp (2.0.1, 1.1.0) net-ssh (2.0.4, 1.1.2) rails (2.1.1, 2.1.0, 2.0.2, 1.2.6, 1.2.3) rake (0.8.2, 0.8.1, 0.7.3) RedCloth (4.0.3, 3.0.4) ruby-openid (2.1.2, 2.0.3, 1.1.4) ruby-yadis (0.3.4) rubygems-update (1.3.0) rubynode (0.1.5, 0.1.4, 0.1.3) sources (0.0.1) sqlite3-ruby (1.2.4, 1.2.1) termios (0.9.4)

===== Development Gems installed ====== Luna:tidbitz mark$ gem list --local

*** LOCAL GEMS ***

actionmailer (2.1.1, 2.1.0, 2.0.2, 1.3.5) actionpack (2.1.1, 2.1.0, 2.0.2, 1.13.6, 1.13.5) actionwebservice (1.2.6, 1.2.5) activerecord (2.1.1, 2.1.0, 2.0.2, 1.15.6, 1.15.5) activeresource (2.1.1, 2.1.0, 2.0.2) activesupport (2.1.1, 2.1.0, 2.0.2, 1.4.4) acts_as_ferret (0.4.3, 0.4.1) capistrano (2.5.0, 2.4.3, 2.1.0) cgi_multipart_eof_fix (2.5.0) columnize (0.1) daemons (1.0.10, 1.0.8) dnssd (0.7.0, 0.6.0) facebooker (0.9.5) fastthread (1.0.1) fcgi (0.8.7) ferret (0.11.6, 0.11.4) flexmock (0.8.3) gem_plugin (0.2.3) highline (1.4.0) hoe (1.7.0, 1.3.0) hpricot (0.6.161, 0.6) httpclient (2.1.2) json (1.1.3, 1.1.2) libxml-ruby (0.8.3, 0.7.0, 0.5.2.0) linecache (0.43) macaddr (1.0.0) mbleigh-acts-as-taggable-on (1.0.2) mislav-will_paginate (2.3.4, 2.3.3) mongrel (1.1.5, 1.0.4) mysql (2.7) needle (1.3.0) net-scp (1.0.1) net-sftp (2.0.1, 1.1.0) net-ssh (2.0.4, 2.0.3, 1.1.2) net-ssh-gateway (1.0.0) rails (2.1.1, 2.1.0, 2.0.2, 1.2.5) rake (0.8.2, 0.8.1, 0.7.3) RedCloth (4.0.3, 3.0.4) ruby-debug (0.10.2, 0.10.0) ruby-debug-base (0.10.2, 0.10.0) ruby-openid (2.1.2, 1.1.4) ruby-yadis (0.3.4) rubyforge (1.0.0, 0.4.4) rubygems-update (1.3.0, 1.2.0) rubynode (0.1.5, 0.1.3) soap4r (1.5.8) sources (0.0.1) sqlite3-ruby (1.2.4, 1.2.1) termios (0.9.4) uuid (2.0.1, 1.0.4) ZenTest (3.10.0, 3.6.1)

That's all the differences I'm aware of. I have no idea what the conflict is here, but if anyone can suggest another place to look for Things That I Can Change, please let me know. If anyone's had (and fixed) this issue before I'd love to know how!

Thank you!

Mark

After two days of installing, reinstalling, updating, downgrading, wailing, gnashing of teeth, and a heavy dose of wine, the cause of the problem, and probably the only meaningful difference between the two computers initially, was this line in the development computers /etc/ profile:

export RUBYOPT=rubygems

That's it.

In the process of tracking this down, I updated to the latest patch of ruby 1.8.6 (287) on both machines, and installed ruby in /usr/local on the production box (rather than using the Apple provided version as I had been doing). But Ruby versions, Gem versions, gems installed... none of it mattered. That line was the only thing missing.

Mark