search for: find_one

Displaying 20 results from an estimated 23 matches for "find_one".

Did you mean: find_done
2010 Sep 09
1
Provisioning Windows
How do I go about provisioning a windows VM? I've added the iso to cobbler using the following command. cobbler image add --name=W2k8Prov --file=nfs://192.168.50.190/ovirt/w2k8.iso The image then appears in the list of Operating Systems to choose when creating a VM. I select the image when I create the VM but then when I go to save I get the error: undefined method `keys' for
2011 Mar 04
7
Example of work with mongo
...re, I''m newbie here and I have a problem with the connection with MongoDB. The connection among Rails and MongoDB works, but I don''t know, how to print only one "column" from document. If I''m trying following a part of code: puts db["testCollection"].find_one().inspect So I''will get the entire structure of BSON, as: {"_id"=>#<BSON::ObjectID:0x118576c ...>, "name"=>"MongoDB", "info"=>{"x"=>203, "y"=>102}, "type"=>"database", "count&quo...
2009 Jul 20
2
Hitting unknown error with "can't dup NilClass"
.../local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ base.rb:2183:in `scope'' /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ base.rb:1548:in `find_every'' /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ base.rb:1588:in `find_one'' /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ base.rb:1574:in `find_from_ids'' /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ base.rb:616:in `find'' /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ a...
2006 Jul 06
0
problema con i test automatizzati
...eguente output: Loaded suite test/unit/product_test Started ..EE Finished in 0.166103 seconds.   1) Error: test_update(ProductTest): ActiveRecord::RecordNotFound: Couldn''t find Product with ID=1 /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:955:in `find_one'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:941:in `find_from_ids'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:382:in `find''    test/unit/product_test.rb:7:in `setup_without_fixtures'' /us...
2007 Dec 22
8
Rails 2.0 rescue_from
I am trying to use the new Rails 2.0 macro : rescue_from class PostsController < ApplicationController rescue_from ActiveRecord::RecordNotFound, :with => :deny_access ... def show @post = Post.find_by_id(params[:id]) raise ActiveRecord::RecordNotFound if @post.nil? #illegal access ..... end def deny_access respond_to do |format| format.html end end but the
2007 Feb 20
1
error message for record not found ?
...ying because of this failed find and not closing the connection correctly? Thanks, Bill ----------- log message ----------- Couldn''t find Emrec with ID=1 - (ActiveRecord::RecordNotFound) C:/InstantRails-1.3/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:955:in `find_one'' C:/InstantRails-1.3/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:941:in `find_from_ids'' C:/InstantRails-1.3/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:382:in `find'' ./script/backgroundrb/../../config/../lib/work...
2006 May 11
0
Handling instantiate_without_callbacks
...cord-1.14.2/ lib/active_record/base.rb:924:in `find_every'' from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/ lib/active_record/base.rb:918:in `find_initial'' from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/ lib/active_record/base.rb:952:in `find_one'' from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/ lib/active_record/base.rb:941:in `find_from_ids'' from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/ lib/active_record/base.rb:382:in `find'' from ./nmea_application.rb:66:in...
2006 Jul 07
1
Rails AR/Oracle Unit Test: [4578] failed (but getting better)
"bitsweat" has given AR/Oracle some love, but it''s still unhappy... http://dev.rubyonrails.org/changeset/4578 ------------------------------------------------------------------------ r4578 | bitsweat | 2006-07-07 10:34:45 -0700 (Fri, 07 Jul 2006) | 1 line find_one uses find_every.first instead of find_initial since its primary key constraint obviates find_initial''s :limit => 1. References #5635. ------------------------------------------------------------------------ U activerecord/lib/active_record/base.rb Updated to revision 4578. 1) Failu...
2009 Aug 21
0
Unable to assign cobbler image as boot device
...uot;"]} RuntimeError (HTTP-Error: 404 Not Found): /usr/lib/ruby/1.8/xmlrpc/client.rb:549:in `do_rpc' /usr/lib/ruby/1.8/xmlrpc/client.rb:420:in `call2' /usr/lib/ruby/1.8/xmlrpc/client.rb:410:in `call' cobbler (0.1.3) lib/cobbler/base.rb:127:in `make_call' (eval):4:in `find_one' app/services/vm_service.rb:291:in `vm_provision' app/services/vm_service.rb:164:in `svc_update' app/services/vm_service.rb:159:in `svc_update' app/controllers/vm_controller.rb:81:in `update' The image is an iso on an nfs mount set up using the cobbler gui. Cheers, Ju...
2006 Aug 27
0
problem with mysql gem
...ers/abstract/connection_specification.rb:78:in `connection'' from /usr/local/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:764:in `sanitize'' from /usr/local/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:950:in `find_one'' from /usr/local/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:941:in `find_from_ids'' from /usr/local/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:382:in `find'' from (irb):3 >> This is...
2009 Aug 28
0
Error connecting to Sybase (odd)
..._adapters/abstract/connection_specification.rb:115:in `connection'' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:3103:in `quoted_table_name'' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:1583:in `find_one'' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:1574:in `find_from_ids'' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:616:in `find'' from (irb):1>> So it seems that I'&...
2011 Sep 18
9
Rails 3 and postgresql
I have a simple project created around a very, very simple database: one main table packs with just three rows Column | Type | Modifiers --------+-----------------------------+---------------------------------------------------- id | integer | not null default nextval(''packs_id_seq''::regclass) nombre | character
2006 Nov 04
2
strange errors in dev.log and webserver log
...Loading Card with ID: undefined Card Load (0.002735) SELECT * FROM cards WHERE (cards.id = ''undefined'') LIMIT 1 ActiveRecord::RecordNotFound (Couldn''t find Card with ID=undefined): /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:955:in `find_one'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:941:in `find_from_ids'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:382:in `find'' .//app/controllers/cards_controller.rb:36:in `edit'' /usr/lib/...
2006 Nov 20
4
Production RAILS_ENV / DB Selection
...d/lib/active_record/base.rb:760:in `columns'' /var/www/gorchie/releases/20061120100506/config/../vendor/rails/activerecord/lib/active_record/base.rb:768:in `columns_hash'' /var/www/gorchie/releases/20061120100506/config/../vendor/rails/activerecord/lib/active_record/base.rb:1020:in `find_one'' /var/www/gorchie/releases/20061120100506/config/../vendor/rails/activerecord/lib/active_record/base.rb:1011:in `find_from_ids'' /var/www/gorchie/releases/20061120100506/config/../vendor/rails/activerecord/lib/active_record/base.rb:416:in `find'' /var/www/gorchie/releases/2...
2006 Apr 21
2
destory Test Case Messes up all tests
I am trying to create unit tests for my users model but when I add a test that destroys a user, that user is not available in any of the other test. If I remove the test that destroys the user all my other tests work again. All the fixtures are suppose be reloaded between tests right? Here is my testcase : require File.dirname(__FILE__) + ''/../test_helper'' class UserTest
2006 Jun 13
13
Pass infomation between different views and controllers
Hi, I am a rails and ruby nuby :-) How do you pass data between different controllers and views? I have a page ( a quote) that I am editing url ....quote/edit/6 6 id the current id. I then go to a catalog (url....catalog) to add an item to my quote (I do this via a line_item file that the quote reads) I now want to go back to the quote. I have tried this <%= link_to ''Back to
2010 Aug 18
6
undefined method `eq' for nil:NilClass
I''m walking through an example in the "Head First Rails" book, but, instead doing the examples using Rails3.0.0.rc. But, I''m getting this error when browsing for example: http://localhost:3000/advs/1 undefined method `eq'' for nil:NilClass Provided that my advs_controller.rb is as follows: http://pastie.org/private/cd9zntg2ite57ept288kfa Any ideas why
2006 Mar 29
0
Intermittent error - undefined method ''destroy_without_callbacks''
...ib/active_record/base.rb:390:in `find_by_sql'' /vendor/rails/activerecord/lib/active_record/base.rb:924:in `find_every'' /vendor/rails/activerecord/lib/active_record/base.rb:918:in `find_initial'' /vendor/rails/activerecord/lib/active_record/base.rb:952:in `find_one'' /vendor/rails/activerecord/lib/active_record/base.rb:941:in `find_from_ids'' /vendor/rails/activerecord/lib/active_record/base.rb:382:in `find'' /lib/item_aids.rb:6:in `get_item'' /app/controllers/items_controller.rb:277:in `version''...
2007 Oct 07
0
Rails AR/Oracle Unit Test: [7769] failed (getting worse)
...;' ./test/../lib/active_record/connection_adapters/abstract/query_cache.rb:55:in `select_all'' ./test/../lib/active_record/base.rb:439:in `find_by_sql'' ./test/../lib/active_record/base.rb:1004:in `find_every'' ./test/../lib/active_record/base.rb:1035:in `find_one'' ./test/../lib/active_record/base.rb:1021:in `find_from_ids'' ./test/../lib/active_record/base.rb:431:in `find'' ./test/date_time_test.rb:13:in `test_saves_both_date_and_time'' /usr/pkg/ruby184/lib/ruby/gems/1.8/gems/mocha-0.5.1/lib/mocha/test_case_a...
2008 Jan 14
0
Controoler/View problem
...e Login controller class, but when i try to access it I got an exception that say "couldn''t find Login With ID=signin" (signin is the method name) and it then show an error, here is the trace: d:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:1267:in `find_one'' d:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:1250:in `find_from_ids'' d:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:504:in `find'' app/controllers/logins_controller.rb:32:in `show'' d:/ruby/lib/ruby/gem...