similar to: putty mysql error

Displaying 20 results from an estimated 400 matches similar to: "putty mysql error"

2010 May 28
3
Beginner Facing Problem with rake db:migrate
I am beginner for this Rails from the past 2 days I am working hard to fix the following error C:\Murali Rubby\demo\library>rake db:migrate --trace (in C:/Murali Rubby/demo/library) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == CreateBooks: migrating ==================================================== --
2006 Jun 20
2
Problem with "can''t dump anonymous class Class"
I submitted this earlier, but the web forums went down and I''ve screwed up the thread, so I''m starting over. I''m trying to built a document upload system. The system has a main Document model with different subclasses for different types of documents. With the code below, if I attempt to create a Document, it works fine, but if I attempt to use one of the subclasses, I
2006 Jun 23
1
''Series'' Pluralization
Howdy, I have a model I called ''content_series''. I created it and noticed that Rails called it ''Sery'', so I added ''series'' to the uncountable thing in the config, like this: Inflector.inflections do |inflect| # inflect.plural /^(ox)$/i, ''\1en'' # inflect.singular /^(ox)en/i, ''\1'' #
2006 Jun 27
3
Weird ActiveRecord Foreign Key Problem
Hello to all, I ran into a weird problem with an ActivRecord. I have a table named "build_order" with a column named "type" that is a foreign key to a table called "building_type". In a controller I try to read all the build_orders with "BuildOrder.find :all" and get the following error and stack trace: (eval):1:in `instance_eval'': compile
2006 Apr 20
1
has_many.count not accepting options hash
has_many.count does not seem to support an options hash like ActiveRecord::Base.count does. Example: >> AcademicProgram.find(:first).course_requirements.count :conditions => "courses.name LIKE ''a%''", :include => :course => 40 >> ap.ap_requirements.count :conditions => "courses.name LIKE ''a%''", :include =>
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,
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 Jun 24
5
Rake vs Ruby for running tests (error discrepency)
I''m having (to me) a strange problem with errors when running my tests with rake as opposed to using ruby. If I do rake test:units I get this error for several tests, but not all: 13) Error: test_player_has_game_statistics_for_season(PlayerSeasonTest): ActiveRecord::StatementInvalid: Mysql::Error: Duplicate entry ''22'' for key 1: INSERT INTO positions (`name`, `id`,
2006 Aug 09
1
Migrating a Field to External Model
I have a model Product with an attribute ''brand''. Currently it is a simple attribute, however, I am migrating it to a separate model Brand so that I can have other attributes with each brand. I created the the model and created and ran the migration to create the new table. So far so good. Then I created a separate migration to transfer the data. The up method
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 Apr 14
1
rake test errors
I have Rails 1.1.2, ruby 1.8.4 and gentoo linux running kernel 2.6.15. Here are the errors: gregg@gregg2 ~/user/DMS $ rake test (in /home/gregg/user/DMS) /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/ ordered_options.rb:2: warning: method redefined; discarding old []= /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/ ordered_options.rb:11: warning: method
2013 Mar 28
1
undefined method 'sanitize_limit' for #<ActiveRecord::Relation:0x2aaaad35d720>
I am trying to upgrate rails from 3.0 to 3.1, while updating rails version I am getting following error rake aborted! undefined method `sanitize_limit'' for #<ActiveRecord::Relation:0x2aaaad35d720> /some_package/lib/ruby/gems/1.8/gems/activerecord-3.1.12/lib/active_record/relation.rb:460:in `method_missing''
2009 Jun 17
2
validates_uniqueness_of fails on STI in Rails 2.3.2
I''ve got something like this: class Position < ActiveRecord::Base end class CartItem < Position validates_uniqueness_of :product_id end When I try to save CartItem I get this error: ArgumentError: wrong number of arguments (1 for 2) from /home/joaz/.gem/ruby/1.8/gems/activerecord-2.3.2/lib/active_record/validations.rb:758:in `exists?'' from
2006 May 28
7
Self-referential has_many :through relationship
Hi, I have a self-referential has_many :through relationship setup to track relationships between users. Basically relationships are modeled as a join table with an extra column ''relation''. create table relationships ( user_id integer unsigned not null, friend_id integer unsigned not null, relation char(1) not null, ) --- relations --- f = friend r = request to
2006 Aug 10
1
Timeout when rebuilding index
Sorry to post twice in a row, but I also wanted help with my index rebuild process - I seem to be getting timeouts when I run the rebuild_index.rb script, like this: /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract_adapter.rb:120:in `log'': Mysql::Error: Lost connection to MySQL server during query: SELECT * FROM search_queries
2006 Apr 18
1
NoMemoryError
I am using the Openbase adapter and have had a similar glitch here and there, but after I go into production I consistently get an error on one page. ActionView::TemplateError (NoMemoryError: failed to allocate memory: SELECT * FROM ... I cannot track down the exact location of the error, but the production log says it was around:
2006 Jun 24
4
setting attribute in constructor, .NEW works but not .CREATE
I have table "decks" with three fields: "id", "created_at" and "cards" which is a 264-character string field. I have modified the model with a constructor, as follows: class Deck < ActiveRecord::Base attr_reader :cards def initialize @cards = "12345" end end If I call Deck.new from my controller, I get no errors and an object with the
2006 May 09
2
newbie: OSX Ruby/MySQL issue?
I''m three pages into the OnLamp RoR Tutorial [1] and am wrestling with what appears to be a MySQL connection problem. I''ve created a simple controller called "recipe" with a corresponding "recipes" mysql table. The recipe controller is just a simple scaffold. When I browse to "recipe/new", though, I get these errors: == NoMethodError in
2006 Jul 03
2
Agile Web Dev on Rails - ActiveRecord::RecordNotFound Prob
Hi there I''ve also made a start on the Agile Web Dev using Rails book! I''ve been hit with a problem when hitting the ''Add to Cart'' button - I get the following error message: ActiveRecord::RecordNotFound in StoreController#add_to_cart Couldn''t find Product without an ID RAILS_ROOT: ./script/../config/.. Application Trace | Framework Trace | Full
2007 Feb 20
1
error message for record not found ?
I''m using backgroundrb for session management and deletion of visitor-entered information when a session is abandoned. The visitor can either click a button to end their session and remove their data, or backgroundrb will do it for them after 5 minutes of inactivity. Everything''s working fine, I think. If the visitor explicitly logs out, then when the worker checks for their