Displaying 20 results from an estimated 5000 matches similar to: "Uploading files: wrong number of arguments (1 for 0)"
2007 Dec 13
4
Attachment_fu problems on updates
On the creation of a member the member''s picture uploads as it should.
However, when updating the member, while selecting a new picture, an
error is thrown:
can''t convert nil into String
RAILS_ROOT: /Users/chris/Documents/Projects/Rails/CommunityCMS/trunk
Application Trace | Framework Trace | Full Trace
2008 May 16
0
attachment_fu and/or rmagick on osx -- weird error
One of our developers is getting a weird error from attachment_fu and/or 
rmagick on OSX.  And even weirder because he''s used attachment_fu and 
rmagick on other projects without difficulty. This all works fine on 
debian/ubuntu.  See the stack trace below.  Any suggestions?
Btw, the code that''s blowing up is retrieving the attachment_fu info.  
The presence of image_science in
2008 Jan 16
0
[CruiseControl] RubyOnRails build 8649 failed
The build failed.
CHANGES
-------
Revision 8649 committed by gbuesing on 2008-01-16 20:07:10
Introducing DateTime #utc, #utc? and #utc_offset, for duck-typing compatibility with Time. Closes #10002
  M /trunk/activesupport/CHANGELOG
  M /trunk/activesupport/lib/active_support/core_ext/date_time/calculations.rb
  M /trunk/activesupport/test/core_ext/date_time_ext_test.rb
TEST FAILURES AND
2008 Jul 10
0
User.protected_attributes returning empty Set instead of nil -- causing activerecord/lib/base:2307 to raise
I have a model that uses attr_accessible, and in my tests I get this:
RuntimeError (Declare either attr_protected or attr_accessible for
User, but not both.):
    /var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
base.rb:2307:in `remove_attributes_protected_from_mass_assignment''
    /var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
base.rb:2114:in
2009 Sep 09
1
Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch Going Nuts!
Hi,
I have been trying to do this for a few days now and cannot figure it out. I
would be very grateful is anyone can help me
I am trying to upload an attachment to AWS, S3 using paperclip,
however every time I keep getting this error:
 ActiveRecord::AssociationTypeMismatch in ProjectController#create_notice
Graphic(#37649720) expected, got Tempfile(#27280470)
RAILS_ROOT:
2005 Oct 27
0
has_one with Single Table Inheritance - NameError : uninitialized constant
I am having a problem with using SIngle Table Inheritance with a has_one
relationship, and I am at a loss of what could be causing it. Below is the
related code and the error message.
 class User < ActiveRecord::Base
has_one :wishlist
end
class List < ActiveRecord::Base
belongs_to :user
end
class Wishlist < List
has_and_belongs_to_many :items, :class_name =>
2009 Sep 10
2
Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch
Hi,
I have been trying to do this for a few days now and cannot figure it
out. I would be very grateful is anyone can help me
I am trying to upload an attachment to AWS, S3 using paperclip,
however every time I keep getting this error:
 ActiveRecord::AssociationTypeMismatch in
ProjectController#create_notice
Graphic(#37649720) expected, got Tempfile(#27280470)
RAILS_ROOT:
2005 Dec 17
2
Subfolders in Rails applications (newbie)
After about a week playing with Rails, I have built a couple of apps but 
am still unable to get one thing to work: subfolders. (I am probably 
using the wrong term here, but oh well...)
I would like my rails application to have controllers logically grouped 
into folders. So for instance:
http://domain.com/accounting/accounts
http://domain.com/hr/employees
Here''s how I have tried to
2008 Oct 14
4
replace_html not working
hallo, everyone
can anybody help me? i did add my code under ENGINES as a module in a
project. before the change , all worked .  and the differenz between
both is only about  application''s environment,
before is
Ruby version              1.8.6 (i486-linux)
RubyGems version          1.1.1
Rails version             2.0.2
Active Record version     2.0.2
Action Pack version       2.0.2
2007 Nov 29
4
collection.build or collection.create gives "ArgumentError: wrong number of arguments (1 for 0)"
I have a Project that has_many Tasks. Tasks belongs to a Project. When
I try the following:
project = Project.new
project.tasks.build
I get:
>> s = Project.new
=> #<Project:0x25f9e28 @attributes={"name"=>"", "end_at"=>nil,
"updated_at"=>nil, "published_at"=>nil, "user_id"=>nil,
2006 May 05
1
Help with ActiveRecord
Model:
class AdminQueue < ActiveRecord::Base
 set_table_name ''adminqueue''
end
Interacting with it in script/console
>> AdminQueue.new
=> #<AdminQueue:0x240a910 @attributes={"topic_id"=>nil,
"resolved"=>nil, "updated_on"=>nil, "action"=>nil, "type"=>nil,
"post_id"=>nil,
2007 Nov 14
1
has_many_polymorphs and acts_as_list ?
First, BRAVO for this wonderful plugin: has_many_polymorphs ! Now my
problem:
4 models : Collection, Page, Fragment, Belonging (which is the join
table):
  1 class Collection <
ActiveRecord::Base
  2   has_many_polymorphs :elements,
  3     :through => :belongings,
  4     :from => [:pages, :fragments, :collections],
  5     :as => :collector,
  6     :parent_order =>
2006 Jan 13
1
validating without saving
i am trying to validate without saving use the valid? method on my
object.  however i keep getting the following error (that i reproduced
in console)  "NoMethodError for field"
Any ideas ?
thanks
adam
Loading development environment.
>> p = Post.new
=> #<Post:0x407b6050 @attributes={"created_on"=>nil, "subcat"=>1,
"cat"=>nil,
2011 Aug 25
0
Rails 3.0 Fleximage Error Errno::EACCES
Hi,
I''m using Fleximage on my website so users can upload avatars. I
recently upgraded to Rails 3.0 and switched host to slicehost.com. I
successfully installed imagemagick and the gems rmagick and fleximage.
Everything seems to be working fine except when I try to edit my account
and upload an avatar. After selecting an avatar and click the update
account button I get the following
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
2007 May 28
2
Rails, respond_to? over anonymous module (extend has_many).
Hello List,
I''m trying to generate examples for some list-helpers I have coded
which use in my projects.
Basically, the Playlist class uses one anonymous module in has_many
that acts as helper between acts_as_list and my desired API:
class Playlist < ActiveRecord::Base
  # associations go here
  has_many :playlist_items, :order => :position, :dependent => :destroy
  has_many
2006 Jul 06
0
Can''t generate AR from script (ActiveRecord::ConnectionNotEstablished)
Generating ActiveRecord instances from the console works fine.
  ./script/console
  Loading development environment.
  >> Pim.new()
  => #<Pim:0xb74427dc @attributes={"vpimitem"=>nil}, @new_record=true>
  >>
But running this little script:
  #!/usr/bin/env ruby
  require File.dirname(__FILE__) + ''/../config/boot''
  Pim.new()
Will spit out
2006 Jul 16
0
Why does belongs_to handle "conflicts" this way?
When you define belongs_to in a model, you can either access
association or association_id.  I was wondering how Rails would handle
things if you set each one to be different.
I made two simple models:
class Foo < ActiveRecord::Base; end
class Bar < ActiveRecord::Base
  belongs_to :foo
end
Now here''s a script/console session.
>> f = Foo.create
=> #<Foo:0x270ec10
2007 Mar 26
5
Session trouble
I am having a problem with an assignment to an object stored in session.
for example when I am in console
o = NewOrder.new
  #   dl = DeliveryLocation.new
  #   o.delivery_location = dl  #=> returns a delivery location object
  #   o.delivery_loaction.save #=> returns true
when I am using the controller
delivery_location = DeliveryLocation.new(params[:delivery_location])
2007 Oct 22
1
self-referential habtm: why are my keys null?
I''m trying to set up a directional self-referential HABTM to represent
an arbitrary semi-hierarchical structure; it works for any data
prepopulated into the db, but when I try to create a new relationship,
I just get NULLs in both key columns (or 0''s if I turn on the no-null
constraint).
Here are the migrations:
class CreateNodes < ActiveRecord::Migration
  def self.up