(Ruby on rails) 错误“ArgumentError (wrong number of arguments (1 for 0))”如何解决

是因为我没有安装'digest/sha1'和'digest/md5'么?当代码中有如下语句,需要安装这几个文件么?谢谢各位的帮助!
require 'digest/sha1'
require 'digest/md5'
require 'rubygems'
require 'atom/feed'

#################################################################################################
运行时出现错误500 internal erro,log记录如下:
/app/models/bookmark.rb:20:in initialize'
/app/models/bookmark.rb:20:in
new'
/app/models/bookmark.rb:20:in uri='
C:/INSTAN~1.0-W/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:2117:in
send'
C:/INSTAN~1.0-W/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:2117:in attributes='
C:/INSTAN~1.0-W/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:2116:in
each'
C:/INSTAN~1.0-W/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:2116:in attributes='
C:/INSTAN~1.0-W/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:1926:in
initialize'
/app/controllers/bookmarks_controller.rb:37:in new'
/app/controllers/bookmarks_controller.rb:37:in
create'
C:/INSTAN~1.0-W/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1158:in `send'
#################################################################################################
我在模型Bookmark.rb中有如下定义:
def uri=(new_uri)
super
self.uri_hash = Digest::MD5.new(new_uri).to_s (第20行)
end
#################################################################################################
bookmarks_controller代码片断如下:
def create
bookmark = Bookmark.find_by_user_id_and_uri(params[:bookmark][:user_id],
params[:bookmark][:uri])
if bookmark
# This user has already bookmarked this URI. They should be
# using PUT instead.
headers['Location'] = bookmark_url(@user.name, bookmark.uri)
render :nothing => true, :status => "409 Conflict"
else
# Enforce default values for 'timestamp' and 'public'
params[:bookmark][:timestamp] ||= Time.now
params[:bookmark][:public] ||= "1"

  # Create the bookmark in the database.
  bookmark = Bookmark.new(params[:bookmark]) (第37行)
  if bookmark.save
    # Add tags.
    bookmark.tag_with(params[:taglist]) if params[:taglist]

    # Send a 201 response code that points to the location of the
    # new bookmark.
    headers['Location'] = bookmark_url(@user.name, bookmark.uri)
    render :nothing => true, :status => "201 Created"
  else
    render :xml => bookmark.errors.to_xml, :status => "400 Bad Request"
  end
end

end

ArgumentError (wrong number of arguments (1 for 0)的意思是你参数传的不正确,本来该不传参数的。结果你给传入了一个参数。
就是这个地方:Digest::MD5.new
这个new方法是不用参数的。。。去掉就可以,去查查MD5的用法。。