Displaying 20 results from an estimated 401 matches for "argumenterror".
2007 Oct 04
0
Prototyping the Dir class
...dir(dir = nil, &block)
if dir.nil?
buf = 0.chr * 1024 # 32k is the official limit
if GetEnvironmentVariable(''USERPROFILE'', buf, buf.size) == 0
if GetEnvironmentVariable(''HOME'', buf, buf.size) == 0
raise ArgumentError, ''USERPROFILE/HOME not set''
end
end
dir = buf.unpack("Z*")[0]
end
if block_given?
begin
buf = 0.chr * MAX_PATH
if GetCurrentDirectory(buf.length, buf) == 0
raise Argumen...
2008 Sep 12
1
ArgumentError: Unknown key(s): dependant
Hello,
I came across an association error today with facebooker.
class Cover < ActiveRecord::Base
belongs_to :album
end
class Album < ActiveRecord::Base
has_one :cover, :dependent => :destroy
end
At the console:
>> Album.find :first
ArgumentError: Unknown key(s): dependant
from
/home/marc/rails_projects/project/vendor/plugins/facebooker/lib/facebooker/rails/helpers.rb:589:in
`assert_valid_keys''
from
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations.rb:1187:in
`create_has_one_reflection...
2010 Oct 30
2
ArgumentError (wrong number of arguments (2 for 0)):
...nyone tell me why I am getting this error using rails3 and
Ruby1.9.2:-
Completed 200 OK in 212313ms (Views: 2.8ms | ActiveRecord: 0.0ms)
Homepage Load (0.2ms) SELECT "homepages".* FROM "homepages" WHERE
("homepages"."section" = ''%Gar%'')
ArgumentError (wrong number of arguments (2 for 0)):
******************************************************************
In my model I have:-
self.where(''section <= ?'', "%#{search_item}%")
or
self.where(:section => "%#{search_item}%")
I am making an ajax call using a f...
2008 Oct 08
3
ArgumentError in "is a pending example" - block not supplied
...our code of the form
it "should and does do something" do
# stuff
end
it "should do something someday"
it "should and does do something else" do
# more stuff
end
Now since I upgraded my gem to rspec 1.8 today, the empty example is
failing with the error ArgumentError in "should do something someday":
block not supplied
Is this by design?
What''s the recommended way to deal with these pending examples? write
a block and call pending within it?
cheers,
Matt
2006 Feb 28
1
ArgumentError (string contains null byte) -- file upload problem
Hi,
Controller code:
if params[:main_image]
image = Image.new
image.blob = params[:main_image].read
@product.main_image.destroy if @product.main_image
@product.main_image = image
end
When I try to display the image using send_data, I get the following error:
ArgumentError (string contains null byte):
.//vendor/rails/actionpack/lib/action_controller/streaming.rb:55:in `file?''
.//vendor/rails/actionpack/lib/action_controller/streaming.rb:55:in
`send_file''
.//app/controllers/images_controller.rb:5:in `show''
Here''s the i...
2006 Mar 25
1
Help with File.set_permissions port
I''ve got a (broken) version of File.set_permissions in CVS, and I need
some help finishing it off please.
Heesob, can you take a look?
Thanks,
Dan
2010 Apr 30
0
Netbeans - Malformed version number string mswin32 (ArgumentError)
...e outside of Netbeans while I was installing ImageMagick and
RMagick... I also had to remove one verson of ImageMagick to use the
one compatible with RMagick.
Everything was working well... then I went to migrate my DB back to
start fresh again and I got :
Malformed version number string mswin32 (ArgumentError)
(LARGER TRACE)
:/Ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:182:in
`initialize'': Malformed version number string mswin32 (ArgumentError)
from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/
vendor_gem_source_index.rb:105:in `new''
from C:/Ruby/lib/rub...
2012 Feb 26
0
Getting ArgumentError calling initialize with ActiveResource 3.2.1
...te_record calls new, and new implicitly calls initialize
(unless I''m not understanding the mystery)
In base.rb
def instantiate_record(record, prefix_options = {})
new(record, true).tap do |resource|
resource.prefix_options = prefix_options
end
end
As it''s written get an ArgumentError as this calls new(record, true).
If I change the code in base.rb to the following:
def instantiate_record(record, prefix_options = {})
new(record).tap do |resource|
resource.prefix_options = prefix_options
end
end
I no longer get the ArgumentError.
Is this a known issue?
--
You receiv...
2006 Aug 04
0
ArgumentError calling Dispatcher.dispatch
Hello. I am hitting a nasty error wherein the the 2nd sequential
request to my rails application is failing with the following error.
Note that I am getting this error with both webrick...
#<ArgumentError: wrong number of arguments (3 for 1)>
["C:/sdks/ruby/1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/webrick_server.rb:115:in
`dispatch''"
...and with Mongrel...
Error calling Dispatcher.dispatch #<ArgumentError: wrong number of
arguments (3
for 1)>
C:/sdks/ruby/1.8.4/li...
2006 Mar 20
5
Need some ACL help for win32-file
...loop do
bool = @@GetFileSecurity.call(
file,
DACL_SECURITY_INFORMATION,
sec_buf,
sec_buf.length,
length_needed
)
if bool == 0 && @@GetLastError.call != ERROR_INSUFFICIENT_BUFFER
raise ArgumentError, get_last_error
end
break if sec_buf.length >= length_needed.unpack(''L'').first
sec_buf += '' '' * length_needed.unpack("L").first
end
control = [0].pack(''L'')
revision = [0].pack(...
2011 Jan 21
6
help writing types/provider
...s absent.
=======================================================
# cat lib/puppet/type/rabbitmq_user.rb
Puppet::Type.newtype(:rabbitmq_user) do
@doc = "Manage RabbitMQ users"
ensurable
newparam(:name) do
desc "The name of the user"
validate do |n|
raise ArgumentError, "cannot be empty" if n.empty?
raise ArgumentError, "can''t contain spaces" if ( n =~ %r(\s+) )
resource[:provider] = :rabbitmq_user
end
isnamevar
end
newparam(:initial_password) do
desc "the password for the user - only set on creation...
2009 Feb 21
2
ArgumentError on model create statement
...39;'ve stripped everything out of my model down to the
basics and still get the error.
So, here is the current model:
class Metric < ActiveRecord::Base
end
When I go into the console, and issue a simple "Metric.create" command I
get the following error:
>> Metric.create
ArgumentError: wrong number of arguments (1 for 0)
from
/src/parkassist/paseweb/vendor/rails/activerecord/lib/active_record/callbacks.rb:288:in
`callback''
from
/src/parkassist/paseweb/vendor/rails/activerecord/lib/active_record/callbacks.rb:288:in
`valid?''
from
/src/parkassist/paseweb/ven...
2005 Dec 31
1
Error when Testing AWS API (ArgumentError: illegal refid http://test.host/login)
...nd I''m running into problems with the functional tests. If I use the
generator to create the web service as
./script/generate web_sevice MyTest do_it
and then run the unit tests without further editing the code, I get
the following error:
test_do_it(MyTestControllerApiTest):
ArgumentError: illegal refid http://test.host/login
/usr/local/ruby/lib/ruby/1.8/soap/baseData.rb:166:in `decode''
/usr/local/ruby/lib/ruby/1.8/soap/encodingstyle/soapHandler.rb:153:in
`decode_tag''
/usr/local/ruby/lib/ruby/1.8/soap/parser.rb:179:in `decode_tag''...
2007 Aug 23
0
"interning empty string - (ArgumentError)" passing AR objects between workers
...ew_worker(:class => :runner_worker, :args => job)
I did add "include DRbUndumped" in my Job model, and it works fine
directly from the console. But from the "dispatcher" worker, I get the
following error (see full traceback attached):
"interning empty string - (ArgumentError)"
How can I get this to work? Is this a known bug? Or is what I am trying
to do (spawning workers from a worker) not supported? Thanks for your help.
PS: Looks like my 1st message didn''t make it through. Sorry if this
becomes a double-post.
--
Yves-Eric Martin
-------------- nex...
2006 Feb 04
0
ArgumentError when installing plugins with -x
...all plugins where this
error has occured. It only occurs when I use the -x flag.
script/plugin install -x
svn://cartographer.rubyforge.org/trunk/vendor/plugins/cartographer
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/commands/plugin.rb:675:in
`method'': wrong number of arguments (0 for 1) (ArgumentError)
from /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/commands/plugin.rb:675:in
`determine_install_method''
from /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/commands/plugin.rb:690:in
`parse!''
from /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/commands/plugin.rb:41...
2006 Mar 29
1
Problems with Ferret 0.9.0
Hi,
I upgraded from 0.3.2 to 0.9.0, and now my old search code doesn''t work
anymore. I get a lot of ArgumentErrors, for example:
"query.add_clause(Search::BooleanClause.new(query_parser.parse(term),
Search::BooleanClause::Occur::MUST))"
raises:
ArgumentError (wrong number of arguments (2 for 0))
"index_searcher.search_each(query)"
raises:
ArgumentError (wrong number of argume...
2007 Aug 24
0
ArgumentError: interning empty string and enum-column plugin
...ry well except
for a few instances where he introduced enums that featured and empty
string IE. enum('''',''Artist'',''Venue'',''Fan'',''Label'').
This causes the mysql_adapter.rb section of the plugin to throw a
"ArgumentError: interning empty string" error in this section of code:
[code]
class MysqlColumnWithEnum < MysqlColumn
include ActiveRecordEnumerations::Column
def initialize(name, default, sql_type = nil, null = true)
if sql_type =~ /^enum/i
values = sql_type.sub(/^enum\(&...
Can not test if model name is Tester in rails 2 (ArgumentError: wrong number of arguments (0 for 1))
2007 Dec 18
0
Can not test if model name is Tester in rails 2 (ArgumentError: wrong number of arguments (0 for 1))
...;
5. unit test the tester model
"ruby test/unit/tester_test.rb"
Here is the error i''ve got everytime
D:\web\Sites\demo>ruby test/unit/tester_test.rb
Loaded suite test/unit/tester_test
Started
.E....
Finished in 0.234 seconds.
1) Error:
testers(ActionController::TestCase):
ArgumentError: wrong number of arguments (0 for 1)
D:/web/Sites/demo/vendor/rails/actionpack/lib/action_controller/
test_case.rb:48:in `initialize''
D:/web/Sites/demo/vendor/rails/actionpack/lib/action_controller/
test_case.rb:48:in `new''
D:/web/Sites/demo/vendor/rails/actionpack/lib...
2009 Jun 01
0
ArgumentError (interning empty string)
Hello,
I am trying to send an email out on registration for confirming and I
am thrown this error. I am unable to understand as nothing is nil in
the class which I am passing to the Mailer. Please do help me. The
stack trace follows:
ArgumentError (interning empty string):
app/controllers/accounts_controller.rb:103:in `register''
app/controllers/accounts_controller.rb:43:in `register''
/usr/lib/ruby/1.8/mongrel.rb:159:in `process_client''
/usr/lib/ruby/1.8/mongrel.rb:158:in `each''
/usr/lib/ruby/1.8/...
2013 Jun 24
0
wrong number of arguments calling `request` (0 for 1) (ArgumentError)
...umber-rails-1.3.1 - at this line
request.session[:user_id].should == Person.find_by_username(user).id
I am getting bellow error.
Then amitpandya should be logged in #
features/step_definitions/session_steps.rb:11
wrong number of arguments calling `request` (0 for 1) (ArgumentError)
./features/step_definitions/session_steps.rb:12:in `/^(.*)\ should\ be\
logged\ in$/''
features/login.feature:23:in `Then amitpandya should be logged in''
Any help How can I fix it?
Thank you.
With kind regards,
Amit Pandya
--
You received this message because you are subs...