Error when execute "script/generate rspec"

I want to use rspec in my new project, but when install rspec, error
occured. Could anyone help me? Thanks in advance.

cd vendor/plugins
git clone git://github.com/dchelimsky/rspec.git
git clone git://github.com/dchelimsky/rspec-rails.git
cd …/…/
script/generate rspec

/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require': no such file to load -- initializer (LoadError) from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 31:inrequire’
from ./script/…/config/boot.rb:54:in load_initializer' from ./script/../config/boot.rb:38:inrun’
from ./script/…/config/boot.rb:11:in boot!' from ./script/../config/boot.rb:109 from script/generate:2:inrequire’
from script/generate:2

Have you frozen rails to vendor/rails?

Thanks for your reply.
I have just solved the probelm. It seems that it could find the right
gem.
There are gems in both /usr/local/lib/ruby/gems/1.8 and /home/
xxxxx/.gems,
I remove the /home/xxxxx/.gems and everything works ok.