similar to: collection.build or collection.create gives "ArgumentError: wrong number of arguments (1 for 0)"

Displaying 20 results from an estimated 800 matches similar to: "collection.build or collection.create gives "ArgumentError: wrong number of arguments (1 for 0)""

2007 May 07
1
attachment_fu seems to be searching the wrong location for my images
I just installed attachment_fu and for some reason, it seems to be looking in the wrong location for my images. I have a Product model that belongs to a photo model. the photo model has the attachment_fu installed and configured like so: class Photo < ActiveRecord::Base has_attachment :content_type => :image, #Allow standard image formats :path_prefix
2007 Nov 15
6
Link_to popup divorced from controller?
Here''s my case: Using a link_to popup window to show a related help file of an element on a page. The problem: Window pops up perfectly, but refuses to carryover @instance variables in the controller that I referenced in the link_to command. The tests: - I have the right controller/class, because it renders a specific template, which is what it does. - I have the right template/view,
2006 Aug 17
3
Ferret locks up when adding items to an index
I''m running Ferret 0.9.5 on a MacBook Pro (OS X 10.4.7) under Locomotive 2.0.7. I have a problem where Ferret is hanging when I try to add items to the index. It doesn''t happen with every object that''s being indexed, and I''m not sure what the objects in question have in common (they are not all instances of the same ActiveRecord object). The process
2006 Aug 02
4
Model still using mysql
When calling a Result.find_by_content on my model, I get the following error: Mysql::Error: Table ''db.results'' doesn''t exist: SHOW FIELDS FROM results Yes, I remembered to put acts_as_ferret. Any ideas? Trace:
2006 Jul 28
3
Forms: handle foreign keys (AssociationTypeMismatch)
Hi all I tried and tried and tried, but I still fail in creating a form with proper validation and stuff for foreign keys... So I''d really like to get some help here. I''m creating a booking site for DJ''s, and for every booking one can choose one of different countries: class Booking < ActiveRecord::Base validates_presence_of :country_id
2006 Jul 11
2
Ferret 0.9.4 C extensions and Macbook Pro
Hello, I am developing on a MacBook Pro. I had installed make and the gcc compiler in order to take advantage of the C extensions, and I installed the ferret 0.9.4 gem. When I installed the gem, it compiled the C extensions as part of the installation process for the gem, and I received this output: Attempting remote installation of ''ferret'' Building native extensions. This
2007 Oct 05
7
Trouble with text_field_tag
I am trying to implement a basic login page: login.rhtml 1 <fieldset> 2 <% form_tag do %> 3 <label for="name">Name:</label> 4 <%= text_field_tag :name, params[:name] %> 5 <label for="password">Password:</label> 6 <%= password_field_tag :password, params[:password] %> 7 <%= submit_tag
2007 Feb 20
2
rails 1.2.1, locomotive and backgroundrb
Hi I just tried to move my project to rails 1.2.1 on my locomotive development setup. It seems that backgroundrb is not willing to start up anymore. If I switch locomotive back to 1.1.6, everthing is fine. This is the error I get while attempting to start backgroundrb: /Applications/Locomotive2/Bundles/standardRailsJan2007.locobundle/
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 Mar 06
0
rake spec aborting
hello, when running rake spec, I''m getting a stack trace similar to the one mentioned in this ticket, which has been resolved: http://rspec.lighthouseapp.com/projects/5645/tickets/237 but from what I understood, if the project is using rspec 1.1.3 (as is the case with mine), this shouldn''t be happening? here''s the stack-trace: rake aborted! Command ruby
2007 Mar 23
0
Error - Conflicting types for parameter containers
Hi, I am trying to implement password-reset functionality. I have an email sent out to a user when they request a password. The URL in the email contains a cgi param, of which is a SHA 256 hex digest. The user clicks on that link and the page is opened in a separate window, when the user enters in their password. When I hit submit, I get the following error, anyone run into this error before?
2007 Apr 09
0
Problem with Ferret on OS X with Locomotive
I am using Locomotive 2.0.8 with Rails 1.2.3 for development. It works great. I recently installed Ferret 0.11.4 as a gem. The installation seemed to go fine. No error or warning messages. I setup a test rails app to try Ferret, and the server won''t start. The error I get is /Applications/Locomotive2/Bundles/rmagickRailsJan2007_x86.locobundle/
2006 Jul 31
0
rescue_action_in_public useless to capture low level errors
Hi all, I''m trying to make for nicer system error handling, with the help of rescue_action_in_public (see Recipe 47, in ''Rails Recipes'') PROBLEM: While it lets me capture an incorrect db name in database.yml (for example), with lower level errors like when the DB server is just down, I still get the default system error screen for MySQL::ERROR :
2006 Dec 08
4
Using custom stem analyzer giving mongrel errors
I''m using the custom stem analyzer: require ''rubygems'' require ''ferret'' include Ferret module Ferret::Analysis class FerretAnalyzer def initialize(stop_words = FULL_ENGLISH_STOP_WORDS) @stop_words = stop_words end def token_stream(field, text) StemFilter.new(StopFilter.new(LowerCaseFilter.new(StandardTokenizer.new(text)),
2006 Dec 15
1
:job_key acting weird?
Hi all I''m experiencing something strange with a :job_key, it took me a very long time to find out a worker wasn''t doing it''s job because of the name of my job_key. The first one I tried was :make_kohier, and with that name (and lot''s of other ones) I can''t get the worker to work. I do get my key in return, but the job doesn''t start
2006 Dec 30
2
error of "no such file to load -- ferret_ext"
I''ve installed the latest version of Ferret (0.10.13) on Mac OS X 10.4.8 (Tiger) and I''m developing using Locomotive2. I installed with: $ gem install ferret I have a ferret_test.rb file: ----begin--------- require ''rubygems'' require ''ferret'' include Ferret index = Index::Index.new(:path => ''/opt/search-index'')
2007 May 11
5
options_for_select - how to set the selected value?
Ok, this should be simple but I am finding it''s not and previous postings don''t seem to shed too much light on this. I have a select_tag with 4 values pulled in via a helper: def filter_hours filter_hours = [ ["1 hour", 1], ["24 hours", 24], ["7 days", 168], ["14 days", 336], ] end The select_tag looks
2008 Mar 31
1
ferret gem installation
Building native extensions. This could take a while... ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) ERROR: Failed to build gem native extension. ruby extconf.rb install ferret creating Makefile make sh: line 1: make: command not found Gem files will remain installed in /Applications/Locomotive2/Bundles/
2007 Feb 26
2
boolean db fields set to false fail validation with validates_presence_of?
I have a model that contains a :boolean field. In my view, I have a simple select of Yes or No, which equates to true or false, respectively. If I choose yes and save, everything works great. If I choose no, my model fails validation as I have this set as a required field using validates_presence_of. I have checked the log and it''s definitely set to false, why would this fail validation?
2007 Aug 25
2
Color gem
I''m using the ruby gem "Color" and I''m having some troubles with to_hex. I''ve installed the gem, and when I try and run the test program I get this error: >> red = Color.new(''ff0000'') => #<Color:0x3685990 @saturation=1.0, @hue=0.0, @lightness=0.5> >> yellow = Color.new(''ffff00'') =>