similar to: Re: undefined method `count' for Array...

Displaying 20 results from an estimated 70000 matches similar to: "Re: undefined method `count' for Array..."

2009 Dec 23
0
Re: undefined method `count' for Array...
James Brennan wrote: > You''re probably seeing this error because ruby 1.8.7 introduced count as > a method on Array, whereas it does not exist in 1.8.6. Chances are > production is running 1.8.6 or earlier. Thank you for your post. That''s exactly what happened to me: dev: 1.8.7 prod: 1.8.6 -- Posted via http://www.ruby-forum.com/. -- You received this message
2011 Nov 19
3
undefined method `+@'
Any idea what might be wrong? ActionView::Template::Error (undefined method `+@'' for #<ActionView::OutputBuffer:0x00000002e51580>): -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2011 May 27
4
undefined method `model_name' for NilClass:Class in a form_for
Hi! I know that there are other topics about this issue, I read them and I''m always blocked. Here is the error message: undefined method `model_name'' for NilClass:Class Extracted source (around line #30): 27: 28: <h2>Add Translation</h2> 29: 30: <%= form_for @new_trad do |f| %> 31: Locale: <%= f.text_field :locale %> 32: Key : <%=
2010 Nov 09
2
Undefined method
I am very new to ROR. (Ruby 1.8.7, rails 2.1.1, rack 0.8.7, mysql 5.1.41) I has my_app/lib/migration_helpers.rb file: module MigrationHelpers def self.foreign_key(from_table, from_column, to_table) constraint_name = "fk_#{from_table}_#{to_table}" execute %{alter table #{from_table} add constraint #{constraint_name} foreign key (#{from_column})
2012 Mar 10
4
undefined local variable or method 'game'
I am doing a web shop assignment and have got a problem with my action mailer. I get an error undefined local variable or method ''game'' I have the following in my mailer: def game_interest(user, game) @user = user @game = Game mail :to => user.email, :subject => "Game Interest" end and the following in my controller: def email @game =
2011 Dec 03
2
script/server error (undefined method `name' for "ZenTest")
Hi All, I have an rails 2.3.11 app which I''m trying to run locally. When runnign script/server i get this error which i googled but couldn''t find the answer anywhere: Gem::SourceIndex#initialize called from /opt/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/vendor_gem_source_index.rb:100. Invalid gemspec in
2010 Mar 09
3
undefined method join for STRING error
Hey all, I was converting a haml file to erb and when finished, I ran the app and got this error message: NoMethodError in Students#student_fail Showing app/views/students/student_fail.erb where line #40 raised: undefined method `join'' for #<String:0x105a5e0c8> Extracted source (around line #40): 37: 38: <% fields << render(:partial =>
2011 Sep 26
2
undefined method `options' for #<EventMachine::HttpClien
Hi , I am writing a rake task to consume twitter stream API. The task contains the following code: consumer = OAuth::Consumer.new(CONSUMER_KEY, CONSUMER_SECRET, :site => ''http://twitter.com'') access_token = OAuth::AccessToken.new(consumer,ACCESS_TOKEN,ACCESS_TOKEN_SECRET) oauth_params = {:consumer => consumer, :token => access_token} EventMachine.run do # now,
2010 Dec 01
1
Prawn : undefined method `make_table'
require ''prawn'' require ''prawn/core'' require ''prawn/layout'' Prawn::Document.new do |pdf| subtable = pdf.make_table([[ "foo", "bar" ], [ "baz", "bax" ]], :column_widths => [ 50, 50 ]) { column(0).background_color = "808080" cells.borders = []
2012 Jul 18
3
Undefined method error
I have been working on a project based on Michael Hartl''s book Ruby on Rails Tutorial in order to try to teach myself Ruby on Rails. However, when it tries to render a form designed to allow a user to submit a small message, I get an error saying, "undefined method `model_name'' for NilClass:Class". It says the error is at line 1, which is "<%= form_for
2010 Feb 23
1
undefined method `scaffold' for AdminController:Class
Hello everyone! I think a little background is necessary. I''ve been a web-developer and linux user for a little over 4 years now, primarily working with PHP and MySQL. I''ve tried several other frameworks like Django and CodeIgniter and several other languages, including python, perl, ASP/.NET, javascript and javascript frameworks, also worked with Oracle and PostgreSQL and many
2011 Jan 13
5
undefined method `xss_terminate'
I''m trying to run a rails app developed by my firm on my Ubuntu machine. I''m using RVM with what I think are all the appropriate gems installed. The application works fine on co-workers OSX machines. When running db:migrate I get the following error: $ rake db:migrate --trace ... rake aborted! An error has occurred, all later migrations canceled: undefined method
2012 Aug 16
6
undefined method `with_indifferent_access' for "":String
Hi I''m having a issue with one object when try to update the attributes in this object previously saved in the database I have one object comp and one object reg they have this relationship comp has_many regs reg belongs_to comp when run use the method valid? like this current_contribuyente.comps.build(params[:comp]).valid? it returns: IndexError (string not matched) And when
2010 Sep 23
1
undefined method `protect_against_forgery?' for #<ActionView
Hi guys This is a pretty tricky one. I get a "undefined method `protect_against_forgery?'' for #<ActionView::Base:0x569a3d4>" error when trying to generate a partial from ''outside'' the web site. I do this as I have a rake task that checks for changes periodically in the background, and if it then sees a change it rebuilds the partial and posts the result
2013 Jun 29
0
rake db:create giving undefined method `' for nil:NilClass
My ruby version is 1.8.7 I have installed mysql-essential-5.0.90-win32 and using Fedena 2.3.5 List of all gems installed:* columnize (0.3.6) declarative_authorization (0.5.1) fattr (2.2.1) ffi (1.9.0) gem_plugin (0.2.3) highline (1.6.19) i18n (0.4.2) metaclass (0.0.1) mime-types (1.23) mocha (0.14.0) mongrel (1.1.5) mysql (2.8.1) net-ping (1.6.0) prawn (0.6.3) prawn-core (0.6.3) prawn-format
2012 Sep 18
2
undefined method `to_sym' for nil:NilClass
Hi all, I am trying to upgrade my rails 2 app to 3 and am getting this error when trying to login: NoMethodError in AuthenticateController#authenticate undefined method `to_sym'' for nil:NilClass The stack trace is: activerecord (3.2.2) lib/active_record/validations/uniqueness.rb:26:in `validate_each'' activemodel (3.2.2) lib/active_model/validator.rb:153:in
2012 Apr 14
7
undefined method `model_name' for NilClass:Class
Hi guys, I just started using Ruby on Rails. After implementing the RoR blog tutorial I started with my own data model. Sadly I am not able to get my create page running. Model: class Activity < ActiveRecord::Base validates :activity, :presence => true validates :forKids, :presence => true validates :start_date, :presence => true end Controller: class ActivitiesController <
2012 Jun 06
1
why to get the error 'undefined method `write_inheritable_attribute''
I started getting this error message when I attempt to do some rake tasks: $ rails destroy scaffold genotypes /usr/share/rails-ruby1.8/railties/lib/rails_generator/options.rb:32:in `default_options'': undefined method `write_inheritable_attribute'' for Rails::Generator::Base:Class (NoMethodError) from /usr/share/rails-ruby1.8/railties/lib/rails_generator/base.rb:90:in
2012 Feb 17
5
undefined method `key?' for nil:NilClass PaperClip
Hello, I have a problem with the paperclip, I put on my GemFile gem "paperclip", "~> 2.6.0" I create a migrate class FileUpload < ActiveRecord::Migration def up change_table :projects do |t| t.has_attached_file :image end end def down drop_attached_file :projects, :image end end on my model I put class Project < ActiveRecord::Base
2010 Oct 21
4
Authlogic + Rails3 - undefined method `Login' for nil:NilClass
Im new to Rails, and decided to start of with Rails3. After a lot of searching ive managed to get a little bit of Authlogic working. I''m able to register a user, login & logout. Now, I would like to add more features, get more of authlogic working. I''m using Railscast EP 160 as my reference. Portions of the code found on the tutorial throw errors: Eg: <!--