On Monday, July 8, 2013 5:26:15 AM UTC-4, Ruby-Forum.com User wrote:
>
> Colin Law wrote in post #1114588: 
> > It is likely that he is getting all records back (as shown by #count) 
> > and that 138 is the lowest id. 
>
>
> Nope:) 
>
> The reason I noticed is that when I did a find all I wasn't getting new 
> records that had been added. 
>
> However, if I get the new records by their id they definitely exist. 
>
> It's got odder this morning, there are now 155 records, and a find all 
> returns the latest records, however records id 139 to 145 are missing! 
> Again, I can get them by id. 
>
> But using Webmin to list the records, I get exactly the same result - so 
> it is looking like a database issue. 
>
> -- 
>

I've been trying but am unable to duplicate your problem.  I'm running on 
rails4 with postgresql9.1 and pg (0.15.1).  Here's my simple test:

1) rails new CheckItOut -d postgresql
2) cd CheckItOut
3) rails generate scaffold Number name:string value:integer
4) rake db:create
5) rake db:migrate
6) rails console
> n = 0 
> while (n < 200) {
>> name = sprintf("%04d", n) 
>> Number.create(:name => name, :value => n) 
>> n += 1 }
7) rails server
8) browsing to localhost:3000/numbers shows an index with 200 entries of 
the expected names and values

Try these steps to see if you really have the database problem as you've 
reported it or if what you're seeing is a result of something lurking in 
your app.

> 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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/f1d7fbc8-aacf-4c3e-badd-74bcdbed9052%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to