strange problem:no such file to load -- nokogiri on rails3

I am test the script named test.rb by command "ruby test.rb" and it
Then i converte it as rake task.
The rake task pass on rails 2.3.4 but fail on rails 3 beta4 with error
"no such file to load -- nokogiri"