gem location problem from rake task

I have installed the following gem which is in my environment.rb. However when I try to run a rake task, it gives the error:

environment.rb config.gem "devise_invitable", :version => '0.2.3'

$ rake mytasks:task (in /home/allen/www/lines) DEPRECATION WARNING: Rake tasks in vendor/plugins/paperclip/tasks are deprecated. Use lib/tasks instead. (called from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/tasks/rails.rb:10) Missing these required gems:   devise_invitable = 0.2.3

You're running:   ruby 1.8.7.249 at /usr/bin/ruby1.8   rubygems 1.3.5 at /home/allen/.gem/ruby/1.8, /usr/lib/ruby/gems/1.8

Run `rake gems:install` to install the missing gems.

so I do "rake gems:install" and it installs.

$ gem env RubyGems Environment:   - RUBYGEMS VERSION: 1.3.7   - RUBY VERSION: 1.8.7 (2010-04-19 patchlevel 253) [x86_64-linux]   - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8   - RUBY EXECUTABLE: /usr/local/bin/ruby   - EXECUTABLE DIRECTORY: /usr/local/bin   - RUBYGEMS PLATFORMS:     - ruby     - x86_64-linux   - GEM PATHS:      - /usr/local/lib/ruby/gems/1.8      - /home/allen/.gem/ruby/1.8   - GEM CONFIGURATION:      - :update_sources => true      - :verbose => true      - :benchmark => false      - :backtrace => false      - :bulk_threshold => 1000   - REMOTE SOURCES:      - http://rubygems.org/

In the directory: $ cd /usr/local/lib/ruby/gems/1.8/gems/ allen@ubuntu:/usr/local/lib/ruby/gems/1.8/gems$ ll total 132 . . drwxr-xr-x 6 root root 4096 2010-08-20 13:50 devise_invitable-0.2.3

HELP!

BTW when I do "gem list" the gem appears:

# gem list allen@ubuntu:~/www/lines$ gem list

*** LOCAL GEMS ***

actionmailer (2.3.8) actionpack (2.3.8) activerecord (2.3.8) activeresource (2.3.8) activesupport (2.3.8) authlogic (2.1.3) bcrypt-ruby (2.1.2) crack (0.1.6) devise (1.0.8, 1.0.7) devise_invitable (0.2.3) <----------------- fastthread (1.0.7) formtastic (0.9.10)