» Home » ArgumentError » Page 1
ArgumentError with ActionMailer
by ferpaz in Programming Languages

I have a login that after saving the new user is supposed to send an email. This works fine locally but on the production server I keep getting this error in my log files:


ArgumentError (wrong number of arguments (8 for 6)):
app/models/user_observer.rb:3:in `after_save'
/usr/lib64/ruby/1.8/observer.rb:185:in `notify_observers'
/usr/lib64/ruby/1.8/observer.rb:

ArgumentError when using TinymceSpellcheck
by jeffrey in Programming Languages

I want to use 'tinymce_spellcheck' to use the spellcheck button in my tinymce editor.
I wrote in my controller:


def spellcheck
data = ActiveSupport::JSON.decode(request.raw_post)
args = data['params'].to_a.first
spellcheck = TinymceSpellcheck.new({}, :raspell)
result = spellcheck.send(data['method'].underscore,*args) #****---- THIS LINE****<

ArgumentError rails
by Colorado in Programming Languages

I have a module that returns an array:


module Module1
class Class1
def self.get
num << 1
return num
end
end
end

But when I call it from the controller like this:


def index
@trans = Module1::Class1.get()
respond_to do |format|
format.html # index.html

ArgumentError on CSV output
by Vasiliy in Programming Languages

i'm getting the following error when trying to generate a CSV:


ArgumentError in ProductsController#schedulecsv


wrong number of arguments (0 for 1)


My Products controller is set up as follows:


def schedulecsv
products = Product.find(:all)
filename ="schedule_#{Date.today.strftime('%d%b%y')}"
csv_data = CSV.generate do |csv|
ArgumentError in rspec
by DMasterX in Programming Languages

I want to write some tree data structure in ruby. The class file:


class Tree
attr_accessor :node, :left, :right
def initialize(node, left=nil, right=nil)
self.node=node
self.left=left
self.right=right
end
end

The rspec file:


require 'init.rb'
describe Tree do
it "should be created

ArgumentError in Rails
by NoTine42 in Web Design

I want to connect two entity (project and issues) and Rails says some error message, but I don't know, what should I do. Can you help me fix it, please? Thanks a lot.



ArgumentError in Devise/sessions#new
by Johan_B in Programming Languages

I get the argument error while using devise. Any one please help.
The error is as follows:


ArgumentError in Devise/sessions#new


wrong number of arguments (3 for 2)
<h2>Sign in</h2>
<%= form_for(resource_name, resource, :url => session_path(resource_name)) do |f| %>
<p><%= f.label :email %></p>
<p>&

AS3 - PixelBender Shader ArgumentError
by scott.sizemore in Programming Languages

I'm having a problem and it's getting really annoying. I want to use a simple Shader to return the colours of all the pixels in an image, but simply assigning a script to a Shader is proving to be a challenge.
I don't know PixelBender script and I don't intend to study it too much since I only want to use it for this simple function, but from examples I've constru


ArgumentError: Error #2025
by George in Programming Languages

I get this error when I try my code:


ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at Main_MouseFollow/onEnterFrame()[C:UsersIdaDocumentsflash kursenSpace shooter del2Main_MouseFollow.as:120]


line 120 is
removeChild(_bullets[j]);


H


ArgumentError calling a Proc
by highland145 in Programming Languages
s = Proc.new {|x|x*2}
puts s.call(5)
-> 10
def foo(&a)
a.call(5)
end
puts "test foo:"
foo(s)

When I try to call the proc above, I get:


foo: wrong number of arguments (1 for 0) (ArgumentError)

My expectation was that I can pass a proc to a method if the method is defined with this type of signa


Next



Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .