---
title: "wrong number of arguments的怪异错误"
author: "muyu"
date: "2008-10-13T18:57:48Z"
tags: [".net", "HTML", "Rails"]
slug: "wrong-number-of-arguments"
draft: false
lastmod: "2008-10-13T18:57:48Z"
id: 252355
url: "https://muyu.iteye.com/blog/252355"
---

页面出现一个大大的“500 Internel Server Error”，从日志中查到原因为

 

“wrong number of arguments (1 for 0)”

 

后来，查资料，从[http://lightyror.thegiive.net/2006/08/rails\_4307.html](http://lightyror.thegiive.net/2006/08/rails_4307.html) 中发现，我的action的名字与Rails冲突了，比如，我在做网银支付，按照文档，我建了两个action：send、receive。结果冲突了，于是send总是被rails认为，它是rails自带的send，所以参数个数一直有错！

 

按照资料显示，以下

 

display  
format  
load  
send  
system  
process  
timeout  
有些名字是 DB 裡面的column不能取的  
notify  
open  
quote  
type

 

以后可要注意啦