Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion last saved record not retrieving .

Received: by 10.68.213.103 with SMTP id nr7mr3656816pbc.7.1352120080525;
        Mon, 05 Nov 2012 04:54:40 -0800 (PST)
X-BeenThere: rubyonrails-talk@googlegroups.com
Received: by 10.68.190.100 with SMTP id gp4ls23714586pbc.9.gmail; Mon, 05 Nov
 2012 04:54:04 -0800 (PST)
Received: by 10.68.253.129 with SMTP id aa1mr1978961pbd.17.1352120044452;
        Mon, 05 Nov 2012 04:54:04 -0800 (PST)
Date: Mon, 5 Nov 2012 04:54:03 -0800 (PST)
From: Fahim Patel <pafa...@gmail.com>
To: rubyonrails-talk@googlegroups.com
Message-Id: <aaa1ae39-8bf3-4b27-a5e4-581a86b0531f@googlegroups.com>
In-Reply-To: <CAL=0gLtJVsa305hTwSKEXupQ-nHAesmZh_wURKpSRxZ4r3wGTw@mail.gmail.com>
References: <aceefae6-5055-478a-94fe-bdca72c4b163@googlegroups.com>
 <CAL=0gLsCpu3ickSasUN2c0P3WGi=zdwJnfT-sx+JsZgFgS8Quw@mail.gmail.com>
 <077a0ad6-ac49-46aa-8084-a1ba93e38076@googlegroups.com> <CAL=0gLtY7-wtsrxuYJGRuZDUSP0EOp25rPGqjJe9dBi376j2AA@mail.gmail.com>
 <3dc7a05e-bee8-47d8-ad91-719908e6e5da@googlegroups.com> <e7c2f411-b0bf-4881-806f-3c26f424f2b2@googlegroups.com>
 <CAL=0gLtJVsa305hTwSKEXupQ-nHAesmZh_wURKpSRxZ4r3wGTw@mail.gmail.com>
Subject: Re: [Rails] last saved record not retrieving .
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1683_29318936.1352120043262"

------=_Part_1683_29318936.1352120043262
Content-Type: multipart/alternative; 
	boundary="----=_Part_1684_16528388.1352120043263"

------=_Part_1684_16528388.1352120043263
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit



On Monday, November 5, 2012 1:22:32 PM UTC+5:30, Colin Law wrote:
>
> On 5 November 2012 06:54, Fahim Patel <paf...@gmail.com <javascript:>> 
> wrote: 
> > 
> > 
> > On Saturday, November 3, 2012 7:05:47 PM UTC+5:30, Fahim Patel wrote: 
> >> 
> >> 
> >> 
> >> On Saturday, November 3, 2012 7:00:23 PM UTC+5:30, Colin Law wrote: 
> >>> 
> >>> On 3 November 2012 12:40, Fahim Patel <paf...@gmail.com> wrote: 
> >>> > 
> >>> > 
> >>> > On Saturday, November 3, 2012 5:20:35 PM UTC+5:30, Colin Law wrote: 
> >>> >> 
> >>> >> On 3 November 2012 11:46, Fahim Patel <paf...@gmail.com> wrote: 
> >>> >> > 
> >>> >> > Hi all, 
> >>> >> > 
> >>> >> > 
> >>> >> > from last 1 hour i am facing one problem. 
> >>> >> > 
> >>> >> > I have written a code for creating  user and show them in index 
> page 
> >>> >> > after 
> >>> >> > save. 
> >>> >> > 
> >>> >> > Code is working perfectly but on index page i am getting all 
> record 
> >>> >> > till 
> >>> >> > second last record saved, but i am not getting current  record 
> which 
> >>> >> > is 
> >>> >> > saved. 
> >>> >> > 
> >>> >> > But in database my last record is saved successful. 
> >>> >> > 
> >>> >> > 
> >>> >> > But when i restart the server , than on index page all record 
> come 
> >>> >> > with 
> >>> >> > the 
> >>> >> > last record . 
> >>> >> > 
> >>> >> > I dont know why this all is happening ? 
> >>> >> 
> >>> >> Have a look at the Rails Guide on debugging, it will show you 
> >>> >> techniques that you can use to debug your code. 
> >>> >> 
> >>> >> Colin 
> >>> > 
> >>> > 
> >>> > Hi Colin, 
> >>> > 
> >>> > Thanks for reply. 
> >>> > I use pry. 
> >>> > I Debug the good , when i use binding.pry my index object select all 
> >>> > records 
> >>> > 
> >>> > but when i remove binding.pry and start to create new record than 
> same 
> >>> > issue 
> >>> > i am facing. 
> >>> > 
> >>> > Last record is not coming 
> >>> 
> >>> Then use some of the other techniques of debugging - insert debug code 
> >>> to print information about what is going on in the console for 
> >>> example.  Print @admins.count for example in the controller index 
> >>> action to try and tie down where the problem lies.  The first thing to 
> >>> determine is whether it the view is not displaying the last record or 
> >>> whether @admins does not include all the records. 
> >>> 
> >>> Are you using the latest version of the database gem?  What is it? 
> >>> Look in Gemfile.lock to find out. 
> >>> 
> >> 
> >> I puts  @admins.count it give me correct counting on controller and 
> when i 
> >> pass the object 
> >> to index view same thing is happening . 
> >> I am using Postgres and as you say i will delete Gemfile.lock and run 
> the 
> >> bundle. 
> >> 
> >> Hope for the best 
> >>> 
> >>> Colin 
> > 
> > 
> > Hi Colin, 
> > Still facing a problem. Table count giving me accurate counting , 
> > 
> > but 
> > @admins = AdminUser.all 
> > give me records till last restart server. 
> > 
> > I don't know why this all is happening ? 
>
> I asked what gem you are using for database access, you have not told 
> us.  Possibly best to post Gemfile, Gemfile.lock and databsae.yml 
> here.  Also tell us which version of ruby and which version of rails 
> and which operating system you are using. 
>
> Also please do not send me a copy of your emails, just send it to the 
> list.  I do not need two copies.  Thanks. 
>
> Colin 
>
>
#######################Gem file.lock################################
GEM
  remote: https://rubygems.org/
  specs:
    RedCloth (4.2.9)
    actionmailer (3.2.4)
      actionpack (= 3.2.4)
      mail (~> 2.4.4)
    actionpack (3.2.4)
      activemodel (= 3.2.4)
      activesupport (= 3.2.4)
      builder (~> 3.0.0)
      erubis (~> 2.7.0)
      journey (~> 1.0.1)
      rack (~> 1.4.0)
      rack-cache (~> 1.2)
      rack-test (~> 0.6.1)
      sprockets (~> 2.1.3)
    activemodel (3.2.4)
      activesupport (= 3.2.4)
      builder (~> 3.0.0)
    activerecord (3.2.4)
      activemodel (= 3.2.4)
      activesupport (= 3.2.4)
      arel (~> 3.0.2)
      tzinfo (~> 0.3.29)
    activeresource (3.2.4)
      activemodel (= 3.2.4)
      activesupport (= 3.2.4)
    activesupport (3.2.4)
      i18n (~> 0.6)
      multi_json (~> 1.0)
    acts-as-taggable-on (2.3.3)
      rails (~> 3.0)
    addressable (2.3.2)
    albino (1.3.3)
      posix-spawn (>= 0.3.6)
    ansi (1.4.3)
    arel (3.0.2)
    bcrypt-ruby (3.0.1)
    blogit (0.5.0)
      RedCloth (>= 4.2.9)
      acts-as-taggable-on (>= 2.2.1)
      albino (>= 1.3.3)
      jquery-rails
      kaminari (>= 0.13.0)
      nokogiri (>= 1.5.0)
      redcarpet (>= 2.0.1)
    builder (3.0.4)
    cancan (1.6.8)
    capybara (1.1.3)
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      selenium-webdriver (~> 2.0)
      xpath (~> 0.1.4)
    childprocess (0.3.6)
      ffi (~> 1.0, >= 1.0.6)
    chronic (0.6.7)
    chunky_png (1.2.6)
    client_side_validations (3.2.1)
    coderay (1.0.8)
    coffee-rails (3.2.2)
      coffee-script (>= 2.2.0)
      railties (~> 3.2.0)
    coffee-script (2.2.0)
      coffee-script-source
      execjs
    coffee-script-source (1.4.0)
    compass (0.12.2)
      chunky_png (~> 1.2)
      fssm (>= 0.2.7)
      sass (~> 3.1)
    compass-rails (1.0.3)
      compass (>= 0.12.2, < 0.14)
    cucumber (1.2.1)
      builder (>= 2.1.2)
      diff-lcs (>= 1.1.3)
      gherkin (~> 2.11.0)
      json (>= 1.4.6)
    cucumber-rails (1.3.0)
      capybara (>= 1.1.2)
      cucumber (>= 1.1.8)
      nokogiri (>= 1.5.0)
    database_cleaner (0.9.1)
    diff-lcs (1.1.3)
    em-websocket (0.3.8)
      addressable (>= 2.1.1)
      eventmachine (>= 0.12.9)
    email_spec (1.4.0)
      launchy (~> 2.1)
      mail (~> 2.2)
    erubis (2.7.0)
    eventmachine (1.0.0)
    execjs (1.4.0)
      multi_json (~> 1.0)
    factory_girl (4.1.0)
      activesupport (>= 3.0.0)
    factory_girl_generator (0.0.3)
    factory_girl_rails (4.1.0)
      factory_girl (~> 4.1.0)
      railties (>= 3.0.0)
    ffaker (1.15.0)
    ffi (1.1.5)
    friendly_id (4.0.9)
    fssm (0.2.9)
    gherkin (2.11.5)
      json (>= 1.4.6)
    growl (1.0.3)
    guard (1.5.3)
      listen (>= 0.4.2)
      lumberjack (>= 1.0.2)
      pry (>= 0.9.10)
      thor (>= 0.14.6)
    guard-livereload (1.1.0)
      em-websocket (>= 0.2.0)
      guard (>= 1.5.0)
      multi_json (~> 1.0)
    guard-rspec (2.1.1)
      guard (>= 1.1)
      rspec (~> 2.11)
    hike (1.2.1)
    hirb (0.7.0)
    i18n (0.6.1)
    journey (1.0.4)
    jquery-rails (2.1.3)
      railties (>= 3.1.0, < 5.0)
      thor (~> 0.14)
    json (1.7.5)
    kaminari (0.14.1)
      actionpack (>= 3.0.0)
      activesupport (>= 3.0.0)
    launchy (2.1.2)
      addressable (~> 2.3)
    libv8 (3.3.10.4)
    libwebsocket (0.1.5)
      addressable
    listen (0.5.3)
    lumberjack (1.0.2)
    mail (2.4.4)
      i18n (>= 0.4.0)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    method_source (0.8.1)
    mime-types (1.19)
    mini_magick (3.4)
      subexec (~> 0.2.1)
    minitest (4.2.0)
    multi_json (1.3.7)
    nokogiri (1.5.5)
    pg (0.14.1)
    pg_search (0.5.7)
      activerecord (>= 3)
      activesupport (>= 3)
    polyglot (0.3.3)
    posix-spawn (0.3.6)
    pry (0.9.10)
      coderay (~> 1.0.5)
      method_source (~> 0.8)
      slop (~> 3.3.1)
    rack (1.4.1)
    rack-cache (1.2)
      rack (>= 0.4)
    rack-ssl (1.3.2)
      rack
    rack-test (0.6.2)
      rack (>= 1.0)
    rails (3.2.4)
      actionmailer (= 3.2.4)
      actionpack (= 3.2.4)
      activerecord (= 3.2.4)
      activeresource (= 3.2.4)
      activesupport (= 3.2.4)
      bundler (~> 1.0)
      railties (= 3.2.4)
    rails3-jquery-autocomplete (1.0.10)
      rails (~> 3.0)
    railties (3.2.4)
      actionpack (= 3.2.4)
      activesupport (= 3.2.4)
      rack-ssl (~> 1.3.2)
      rake (>= 0.8.7)
      rdoc (~> 3.4)
      thor (>= 0.14.6, < 2.0)
    rake (0.9.2.2)
    rb-readline (0.4.2)
    rdoc (3.12)
      json (~> 1.4)
    recaptcha (0.3.4)
    redcarpet (2.2.2)
    rspec (2.11.0)
      rspec-core (~> 2.11.0)
      rspec-expectations (~> 2.11.0)
      rspec-mocks (~> 2.11.0)
    rspec-core (2.11.1)
    rspec-expectations (2.11.3)
      diff-lcs (~> 1.1.3)
    rspec-mocks (2.11.3)
    rspec-rails (2.11.4)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      railties (>= 3.0)
      rspec (~> 2.11.0)
    rubyzip (0.9.9)
    sass (3.2.2)
    sass-rails (3.2.5)
      railties (~> 3.2.0)
      sass (>= 3.1.10)
      tilt (~> 1.3)
    selenium-webdriver (2.26.0)
      childprocess (>= 0.2.5)
      libwebsocket (~> 0.1.3)
      multi_json (~> 1.0)
      rubyzip
    shoulda-matchers (1.4.1)
      activesupport (>= 3.0.0)
    simplecov (0.7.1)
      multi_json (~> 1.0)
      simplecov-html (~> 0.7.1)
    simplecov-html (0.7.1)
    sitemap_generator (3.4)
      builder
    slop (3.3.3)
    sprockets (2.1.3)
      hike (~> 1.2)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    subexec (0.2.2)
    therubyracer (0.10.2)
      libv8 (~> 3.3.10)
    thor (0.16.0)
    tilt (1.3.3)
    treetop (1.4.12)
      polyglot
      polyglot (>= 0.3.1)
    turn (0.9.6)
      ansi
    tzinfo (0.3.34)
    uglifier (1.3.0)
      execjs (>= 0.3.0)
      multi_json (~> 1.0, >= 1.0.2)
    whenever (0.7.3)
      activesupport (>= 2.3.4)
      chronic (~> 0.6.3)
    wicked (0.3.0)
      activesupport (>= 3.0.7)
      rails (>= 3.0.7)
    xpath (0.1.4)
      nokogiri (~> 1.3)

PLATFORMS
  ruby

DEPENDENCIES
  bcrypt-ruby
  blogit
  cancan
  capybara
  client_side_validations
  coffee-rails (~> 3.2.1)
  compass-rails
  cucumber-rails
  database_cleaner
  email_spec
  execjs
  factory_girl
  factory_girl_generator
  factory_girl_rails
  ffaker
  friendly_id (~> 4.0.1)
  growl
  guard-livereload
  guard-rspec
  hirb
  jquery-rails
  launchy
  mini_magick
  minitest
  pg
  pg_search
  pry
  rails (= 3.2.4)
  rails3-jquery-autocomplete
  rb-readline
  recaptcha
  rspec-rails
  sass-rails (~> 3.2.3)
  selenium-webdriver
  shoulda-matchers
  simplecov
  sitemap_generator
  therubyracer
  turn
  uglifier (>= 1.0.3)
  whenever
  wicked


OS  - Ubunto 11.10
Ruby version  -  ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
Raills Version - rails 3.2.4

###################database yml###################3
# PostgreSQL. Versions 8.2 and up are supported.
#
# Install the pg driver:
#   gem install pg
# On Mac OS X with macports:
#   gem install pg -- 
--with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
# On Windows:
#   gem install pg
#       Choose the win32 build.
#       Install PostgreSQL and put its /bin directory on your path.
#
# Configure Using Gemfile
# gem 'pg'
#
development:
  adapter: postgresql  
  database: app_development
  pool: 5
  username: app_app
  password: app
  encoding: utf8  
  host: localhost

  # Connect on a TCP socket. Omitted by default since the client uses a
  # domain socket that doesn't need configuration. Windows does not have
  # domain sockets, so uncomment these lines.
  #host: localhost
  #port: 5432

  # Schema search path. The server defaults to $user,public
  #schema_search_path: myapp,sharedapp,public

  # Minimum log levels, in increasing order:
  #   debug5, debug4, debug3, debug2, debug1,
  #   log, notice, warning, error, fatal, and panic
  # The server defaults to notice.
  #min_messages: warning

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test: &test
  adapter: postgresql
  encoding: utf8
  database: app_test
  pool: 5
  username: app_app
  password: app
  host: localhost

production:
  adapter: postgresql
  encoding: utf8
  database: app_production
  pool: 5
  username: app_app
  password: app
  host: localhost
cucumber:
  <<: *test


 

> >>> 
> >>> 
> >>> 
> >>> 
> >>> > 
> >>> > Thanks 
> >>> >> 
> >>> >> 
> >>> >> > Code below 
> >>> >> > 
> >>> >> > 
> >>> >> > ######## controller code 
> >>> >> > class AdminUsersController < ApplicationController 
> >>> >> >   def new 
> >>> >> >     @admin = AdminUser.new 
> >>> >> >   end 
> >>> >> > 
> >>> >> >   def index 
> >>> >> >     @admins = AdminUser.all 
> >>> >> >   end 
> >>> >> > 
> >>> >> >   def create 
> >>> >> >     @admin = AdminUser.new(params[:admin_user]) 
> >>> >> >     if @admin.save 
> >>> >> > 
> >>> >> >       redirect_to admin_users_path 
> >>> >> >     else 
> >>> >> >       render "new" 
> >>> >> >     end 
> >>> >> >   end 
> >>> >> > end 
> >>> >> > 
> >>> >> > ######## new view############ 
> >>> >> > <%= form_for @admin do|f|%> 
> >>> >> > 
> >>> >> > First Name 
> >>> >> > <%= f.text_field :first_name%> 
> >>> >> > <%= submit_tag"Create"%> 
> >>> >> > <% end %> 
> >>> >> > ######## index view############ 
> >>> >> > <%= @admins%> 
> >>> >> > 
> >>> >> > ##############model 
> >>> >> > nothing in model 
> >>> >> > 
> >>> >> > 
> >>> >> > 
> >>> >> > Hope you all understand the problem . 
> >>> >> > 
> >>> >> > 
> >>> >> > Thanks 
> >>> >> > 
> >>> >> > Regards 
> >>> >> > Fahim Babar Patel 
> >>> >> > 
> >>> >> > 
> >>> >> > 
> >>> >> > 
> >>> >> > 
> >>> >> > -- 
> >>> >> > 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 rubyonra...@googlegroups.com. 
>
> >>> >> > To unsubscribe from this group, send email to 
> >>> >> > rubyonrails-ta...@googlegroups.com. 
> >>> >> > To view this discussion on the web visit 
> >>> >> > https://groups.google.com/d/msg/rubyonrails-talk/-/-TdNVrabhvAJ. 
> >>> >> > For more options, visit https://groups.google.com/groups/opt_out. 
>
> >>> >> > 
> >>> >> > 
>



 

------=_Part_1684_16528388.1352120043263
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<br><br>On Monday, November 5, 2012 1:22:32 PM UTC+5:30, Colin Law wrote:<b=
lockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;borde=
r-left: 1px #ccc solid;padding-left: 1ex;">On 5 November 2012 06:54, Fahim =
Patel &lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=
=3D"uMtxYap3PhEJ">paf...@gmail.com</a>&gt; wrote:
<br>&gt;
<br>&gt;
<br>&gt; On Saturday, November 3, 2012 7:05:47 PM UTC+5:30, Fahim Patel wro=
te:
<br>&gt;&gt;
<br>&gt;&gt;
<br>&gt;&gt;
<br>&gt;&gt; On Saturday, November 3, 2012 7:00:23 PM UTC+5:30, Colin Law w=
rote:
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; On 3 November 2012 12:40, Fahim Patel &lt;<a>paf...@gmail.=
com</a>&gt; wrote:
<br>&gt;&gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt; On Saturday, November 3, 2012 5:20:35 PM UTC+5:30, Co=
lin Law wrote:
<br>&gt;&gt;&gt; &gt;&gt;
<br>&gt;&gt;&gt; &gt;&gt; On 3 November 2012 11:46, Fahim Patel &lt;<a>paf.=
....@gmail.com</a>&gt; wrote:
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; Hi all,
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; from last 1 hour i am facing one problem.
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; I have written a code for creating &nbsp;use=
r and show them in index page
<br>&gt;&gt;&gt; &gt;&gt; &gt; after
<br>&gt;&gt;&gt; &gt;&gt; &gt; save.
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; Code is working perfectly but on index page =
i am getting all record
<br>&gt;&gt;&gt; &gt;&gt; &gt; till
<br>&gt;&gt;&gt; &gt;&gt; &gt; second last record saved, but i am not getti=
ng current &nbsp;record which
<br>&gt;&gt;&gt; &gt;&gt; &gt; is
<br>&gt;&gt;&gt; &gt;&gt; &gt; saved.
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; But in database my last record is saved succ=
essful.
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; But when i restart the server , than on inde=
x page all record come
<br>&gt;&gt;&gt; &gt;&gt; &gt; with
<br>&gt;&gt;&gt; &gt;&gt; &gt; the
<br>&gt;&gt;&gt; &gt;&gt; &gt; last record .
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; I dont know why this all is happening ?
<br>&gt;&gt;&gt; &gt;&gt;
<br>&gt;&gt;&gt; &gt;&gt; Have a look at the Rails Guide on debugging, it w=
ill show you
<br>&gt;&gt;&gt; &gt;&gt; techniques that you can use to debug your code.
<br>&gt;&gt;&gt; &gt;&gt;
<br>&gt;&gt;&gt; &gt;&gt; Colin
<br>&gt;&gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt; Hi Colin,
<br>&gt;&gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt; Thanks for reply.
<br>&gt;&gt;&gt; &gt; I use pry.
<br>&gt;&gt;&gt; &gt; I Debug the good , when i use binding.pry my index ob=
ject select all
<br>&gt;&gt;&gt; &gt; records
<br>&gt;&gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt; but when i remove binding.pry and start to create new=
 record than same
<br>&gt;&gt;&gt; &gt; issue
<br>&gt;&gt;&gt; &gt; i am facing.
<br>&gt;&gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt; Last record is not coming
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; Then use some of the other techniques of debugging - inser=
t debug code
<br>&gt;&gt;&gt; to print information about what is going on in the console=
 for
<br>&gt;&gt;&gt; example. &nbsp;Print @admins.count for example in the cont=
roller index
<br>&gt;&gt;&gt; action to try and tie down where the problem lies. &nbsp;T=
he first thing to
<br>&gt;&gt;&gt; determine is whether it the view is not displaying the las=
t record or
<br>&gt;&gt;&gt; whether @admins does not include all the records.
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; Are you using the latest version of the database gem? &nbs=
p;What is it?
<br>&gt;&gt;&gt; Look in Gemfile.lock to find out.
<br>&gt;&gt;&gt;
<br>&gt;&gt;
<br>&gt;&gt; I puts &nbsp;@admins.count it give me correct counting on cont=
roller and when i
<br>&gt;&gt; pass the object
<br>&gt;&gt; to index view same thing is happening .
<br>&gt;&gt; I am using Postgres and as you say i will delete Gemfile.lock =
and run the
<br>&gt;&gt; bundle.
<br>&gt;&gt;
<br>&gt;&gt; Hope for the best
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; Colin
<br>&gt;
<br>&gt;
<br>&gt; Hi Colin,
<br>&gt; Still facing a problem. Table count giving me accurate counting ,
<br>&gt;
<br>&gt; but
<br>&gt; @admins =3D AdminUser.all
<br>&gt; give me records till last restart server.
<br>&gt;
<br>&gt; I don't know why this all is happening ?
<br>
<br>I asked what gem you are using for database access, you have not told
<br>us. &nbsp;Possibly best to post Gemfile, Gemfile.lock and databsae.yml
<br>here. &nbsp;Also tell us which version of ruby and which version of rai=
ls
<br>and which operating system you are using.
<br>
<br>Also please do not send me a copy of your emails, just send it to the
<br>list. &nbsp;I do not need two copies. &nbsp;Thanks.
<br>
<br>Colin
<br>
<br></blockquote><div><br></div><div>#######################Gem file.lock##=
##############################</div><div><div>GEM</div><div>&nbsp; remote: =
https://rubygems.org/</div><div>&nbsp; specs:</div><div>&nbsp; &nbsp; RedCl=
oth (4.2.9)</div><div>&nbsp; &nbsp; actionmailer (3.2.4)</div><div>&nbsp; &=
nbsp; &nbsp; actionpack (=3D 3.2.4)</div><div>&nbsp; &nbsp; &nbsp; mail (~&=
gt; 2.4.4)</div><div>&nbsp; &nbsp; actionpack (3.2.4)</div><div>&nbsp; &nbs=
p; &nbsp; activemodel (=3D 3.2.4)</div><div>&nbsp; &nbsp; &nbsp; activesupp=
ort (=3D 3.2.4)</div><div>&nbsp; &nbsp; &nbsp; builder (~&gt; 3.0.0)</div><=
div>&nbsp; &nbsp; &nbsp; erubis (~&gt; 2.7.0)</div><div>&nbsp; &nbsp; &nbsp=
; journey (~&gt; 1.0.1)</div><div>&nbsp; &nbsp; &nbsp; rack (~&gt; 1.4.0)</=
div><div>&nbsp; &nbsp; &nbsp; rack-cache (~&gt; 1.2)</div><div>&nbsp; &nbsp=
; &nbsp; rack-test (~&gt; 0.6.1)</div><div>&nbsp; &nbsp; &nbsp; sprockets (=
~&gt; 2.1.3)</div><div>&nbsp; &nbsp; activemodel (3.2.4)</div><div>&nbsp; &=
nbsp; &nbsp; activesupport (=3D 3.2.4)</div><div>&nbsp; &nbsp; &nbsp; build=
er (~&gt; 3.0.0)</div><div>&nbsp; &nbsp; activerecord (3.2.4)</div><div>&nb=
sp; &nbsp; &nbsp; activemodel (=3D 3.2.4)</div><div>&nbsp; &nbsp; &nbsp; ac=
tivesupport (=3D 3.2.4)</div><div>&nbsp; &nbsp; &nbsp; arel (~&gt; 3.0.2)</=
div><div>&nbsp; &nbsp; &nbsp; tzinfo (~&gt; 0.3.29)</div><div>&nbsp; &nbsp;=
 activeresource (3.2.4)</div><div>&nbsp; &nbsp; &nbsp; activemodel (=3D 3.2=
.4)</div><div>&nbsp; &nbsp; &nbsp; activesupport (=3D 3.2.4)</div><div>&nbs=
p; &nbsp; activesupport (3.2.4)</div><div>&nbsp; &nbsp; &nbsp; i18n (~&gt; =
0.6)</div><div>&nbsp; &nbsp; &nbsp; multi_json (~&gt; 1.0)</div><div>&nbsp;=
 &nbsp; acts-as-taggable-on (2.3.3)</div><div>&nbsp; &nbsp; &nbsp; rails (~=
&gt; 3.0)</div><div>&nbsp; &nbsp; addressable (2.3.2)</div><div>&nbsp; &nbs=
p; albino (1.3.3)</div><div>&nbsp; &nbsp; &nbsp; posix-spawn (&gt;=3D 0.3.6=
)</div><div>&nbsp; &nbsp; ansi (1.4.3)</div><div>&nbsp; &nbsp; arel (3.0.2)=
</div><div>&nbsp; &nbsp; bcrypt-ruby (3.0.1)</div><div>&nbsp; &nbsp; blogit=
 (0.5.0)</div><div>&nbsp; &nbsp; &nbsp; RedCloth (&gt;=3D 4.2.9)</div><div>=
&nbsp; &nbsp; &nbsp; acts-as-taggable-on (&gt;=3D 2.2.1)</div><div>&nbsp; &=
nbsp; &nbsp; albino (&gt;=3D 1.3.3)</div><div>&nbsp; &nbsp; &nbsp; jquery-r=
ails</div><div>&nbsp; &nbsp; &nbsp; kaminari (&gt;=3D 0.13.0)</div><div>&nb=
sp; &nbsp; &nbsp; nokogiri (&gt;=3D 1.5.0)</div><div>&nbsp; &nbsp; &nbsp; r=
edcarpet (&gt;=3D 2.0.1)</div><div>&nbsp; &nbsp; builder (3.0.4)</div><div>=
&nbsp; &nbsp; cancan (1.6.8)</div><div>&nbsp; &nbsp; capybara (1.1.3)</div>=
<div>&nbsp; &nbsp; &nbsp; mime-types (&gt;=3D 1.16)</div><div>&nbsp; &nbsp;=
 &nbsp; nokogiri (&gt;=3D 1.3.3)</div><div>&nbsp; &nbsp; &nbsp; rack (&gt;=
=3D 1.0.0)</div><div>&nbsp; &nbsp; &nbsp; rack-test (&gt;=3D 0.5.4)</div><d=
iv>&nbsp; &nbsp; &nbsp; selenium-webdriver (~&gt; 2.0)</div><div>&nbsp; &nb=
sp; &nbsp; xpath (~&gt; 0.1.4)</div><div>&nbsp; &nbsp; childprocess (0.3.6)=
</div><div>&nbsp; &nbsp; &nbsp; ffi (~&gt; 1.0, &gt;=3D 1.0.6)</div><div>&n=
bsp; &nbsp; chronic (0.6.7)</div><div>&nbsp; &nbsp; chunky_png (1.2.6)</div=
><div>&nbsp; &nbsp; client_side_validations (3.2.1)</div><div>&nbsp; &nbsp;=
 coderay (1.0.8)</div><div>&nbsp; &nbsp; coffee-rails (3.2.2)</div><div>&nb=
sp; &nbsp; &nbsp; coffee-script (&gt;=3D 2.2.0)</div><div>&nbsp; &nbsp; &nb=
sp; railties (~&gt; 3.2.0)</div><div>&nbsp; &nbsp; coffee-script (2.2.0)</d=
iv><div>&nbsp; &nbsp; &nbsp; coffee-script-source</div><div>&nbsp; &nbsp; &=
nbsp; execjs</div><div>&nbsp; &nbsp; coffee-script-source (1.4.0)</div><div=
>&nbsp; &nbsp; compass (0.12.2)</div><div>&nbsp; &nbsp; &nbsp; chunky_png (=
~&gt; 1.2)</div><div>&nbsp; &nbsp; &nbsp; fssm (&gt;=3D 0.2.7)</div><div>&n=
bsp; &nbsp; &nbsp; sass (~&gt; 3.1)</div><div>&nbsp; &nbsp; compass-rails (=
1.0.3)</div><div>&nbsp; &nbsp; &nbsp; compass (&gt;=3D 0.12.2, &lt; 0.14)</=
div><div>&nbsp; &nbsp; cucumber (1.2.1)</div><div>&nbsp; &nbsp; &nbsp; buil=
der (&gt;=3D 2.1.2)</div><div>&nbsp; &nbsp; &nbsp; diff-lcs (&gt;=3D 1.1.3)=
</div><div>&nbsp; &nbsp; &nbsp; gherkin (~&gt; 2.11.0)</div><div>&nbsp; &nb=
sp; &nbsp; json (&gt;=3D 1.4.6)</div><div>&nbsp; &nbsp; cucumber-rails (1.3=
.0)</div><div>&nbsp; &nbsp; &nbsp; capybara (&gt;=3D 1.1.2)</div><div>&nbsp=
; &nbsp; &nbsp; cucumber (&gt;=3D 1.1.8)</div><div>&nbsp; &nbsp; &nbsp; nok=
ogiri (&gt;=3D 1.5.0)</div><div>&nbsp; &nbsp; database_cleaner (0.9.1)</div=
><div>&nbsp; &nbsp; diff-lcs (1.1.3)</div><div>&nbsp; &nbsp; em-websocket (=
0.3.8)</div><div>&nbsp; &nbsp; &nbsp; addressable (&gt;=3D 2.1.1)</div><div=
>&nbsp; &nbsp; &nbsp; eventmachine (&gt;=3D 0.12.9)</div><div>&nbsp; &nbsp;=
 email_spec (1.4.0)</div><div>&nbsp; &nbsp; &nbsp; launchy (~&gt; 2.1)</div=
><div>&nbsp; &nbsp; &nbsp; mail (~&gt; 2.2)</div><div>&nbsp; &nbsp; erubis =
(2.7.0)</div><div>&nbsp; &nbsp; eventmachine (1.0.0)</div><div>&nbsp; &nbsp=
; execjs (1.4.0)</div><div>&nbsp; &nbsp; &nbsp; multi_json (~&gt; 1.0)</div=
><div>&nbsp; &nbsp; factory_girl (4.1.0)</div><div>&nbsp; &nbsp; &nbsp; act=
ivesupport (&gt;=3D 3.0.0)</div><div>&nbsp; &nbsp; factory_girl_generator (=
0.0.3)</div><div>&nbsp; &nbsp; factory_girl_rails (4.1.0)</div><div>&nbsp; =
&nbsp; &nbsp; factory_girl (~&gt; 4.1.0)</div><div>&nbsp; &nbsp; &nbsp; rai=
lties (&gt;=3D 3.0.0)</div><div>&nbsp; &nbsp; ffaker (1.15.0)</div><div>&nb=
sp; &nbsp; ffi (1.1.5)</div><div>&nbsp; &nbsp; friendly_id (4.0.9)</div><di=
v>&nbsp; &nbsp; fssm (0.2.9)</div><div>&nbsp; &nbsp; gherkin (2.11.5)</div>=
<div>&nbsp; &nbsp; &nbsp; json (&gt;=3D 1.4.6)</div><div>&nbsp; &nbsp; grow=
l (1.0.3)</div><div>&nbsp; &nbsp; guard (1.5.3)</div><div>&nbsp; &nbsp; &nb=
sp; listen (&gt;=3D 0.4.2)</div><div>&nbsp; &nbsp; &nbsp; lumberjack (&gt;=
=3D 1.0.2)</div><div>&nbsp; &nbsp; &nbsp; pry (&gt;=3D 0.9.10)</div><div>&n=
bsp; &nbsp; &nbsp; thor (&gt;=3D 0.14.6)</div><div>&nbsp; &nbsp; guard-live=
reload (1.1.0)</div><div>&nbsp; &nbsp; &nbsp; em-websocket (&gt;=3D 0.2.0)<=
/div><div>&nbsp; &nbsp; &nbsp; guard (&gt;=3D 1.5.0)</div><div>&nbsp; &nbsp=
; &nbsp; multi_json (~&gt; 1.0)</div><div>&nbsp; &nbsp; guard-rspec (2.1.1)=
</div><div>&nbsp; &nbsp; &nbsp; guard (&gt;=3D 1.1)</div><div>&nbsp; &nbsp;=
 &nbsp; rspec (~&gt; 2.11)</div><div>&nbsp; &nbsp; hike (1.2.1)</div><div>&=
nbsp; &nbsp; hirb (0.7.0)</div><div>&nbsp; &nbsp; i18n (0.6.1)</div><div>&n=
bsp; &nbsp; journey (1.0.4)</div><div>&nbsp; &nbsp; jquery-rails (2.1.3)</d=
iv><div>&nbsp; &nbsp; &nbsp; railties (&gt;=3D 3.1.0, &lt; 5.0)</div><div>&=
nbsp; &nbsp; &nbsp; thor (~&gt; 0.14)</div><div>&nbsp; &nbsp; json (1.7.5)<=
/div><div>&nbsp; &nbsp; kaminari (0.14.1)</div><div>&nbsp; &nbsp; &nbsp; ac=
tionpack (&gt;=3D 3.0.0)</div><div>&nbsp; &nbsp; &nbsp; activesupport (&gt;=
=3D 3.0.0)</div><div>&nbsp; &nbsp; launchy (2.1.2)</div><div>&nbsp; &nbsp; =
&nbsp; addressable (~&gt; 2.3)</div><div>&nbsp; &nbsp; libv8 (3.3.10.4)</di=
v><div>&nbsp; &nbsp; libwebsocket (0.1.5)</div><div>&nbsp; &nbsp; &nbsp; ad=
dressable</div><div>&nbsp; &nbsp; listen (0.5.3)</div><div>&nbsp; &nbsp; lu=
mberjack (1.0.2)</div><div>&nbsp; &nbsp; mail (2.4.4)</div><div>&nbsp; &nbs=
p; &nbsp; i18n (&gt;=3D 0.4.0)</div><div>&nbsp; &nbsp; &nbsp; mime-types (~=
&gt; 1.16)</div><div>&nbsp; &nbsp; &nbsp; treetop (~&gt; 1.4.8)</div><div>&=
nbsp; &nbsp; method_source (0.8.1)</div><div>&nbsp; &nbsp; mime-types (1.19=
)</div><div>&nbsp; &nbsp; mini_magick (3.4)</div><div>&nbsp; &nbsp; &nbsp; =
subexec (~&gt; 0.2.1)</div><div>&nbsp; &nbsp; minitest (4.2.0)</div><div>&n=
bsp; &nbsp; multi_json (1.3.7)</div><div>&nbsp; &nbsp; nokogiri (1.5.5)</di=
v><div>&nbsp; &nbsp; pg (0.14.1)</div><div>&nbsp; &nbsp; pg_search (0.5.7)<=
/div><div>&nbsp; &nbsp; &nbsp; activerecord (&gt;=3D 3)</div><div>&nbsp; &n=
bsp; &nbsp; activesupport (&gt;=3D 3)</div><div>&nbsp; &nbsp; polyglot (0.3=
.3)</div><div>&nbsp; &nbsp; posix-spawn (0.3.6)</div><div>&nbsp; &nbsp; pry=
 (0.9.10)</div><div>&nbsp; &nbsp; &nbsp; coderay (~&gt; 1.0.5)</div><div>&n=
bsp; &nbsp; &nbsp; method_source (~&gt; 0.8)</div><div>&nbsp; &nbsp; &nbsp;=
 slop (~&gt; 3.3.1)</div><div>&nbsp; &nbsp; rack (1.4.1)</div><div>&nbsp; &=
nbsp; rack-cache (1.2)</div><div>&nbsp; &nbsp; &nbsp; rack (&gt;=3D 0.4)</d=
iv><div>&nbsp; &nbsp; rack-ssl (1.3.2)</div><div>&nbsp; &nbsp; &nbsp; rack<=
/div><div>&nbsp; &nbsp; rack-test (0.6.2)</div><div>&nbsp; &nbsp; &nbsp; ra=
ck (&gt;=3D 1.0)</div><div>&nbsp; &nbsp; rails (3.2.4)</div><div>&nbsp; &nb=
sp; &nbsp; actionmailer (=3D 3.2.4)</div><div>&nbsp; &nbsp; &nbsp; actionpa=
ck (=3D 3.2.4)</div><div>&nbsp; &nbsp; &nbsp; activerecord (=3D 3.2.4)</div=
><div>&nbsp; &nbsp; &nbsp; activeresource (=3D 3.2.4)</div><div>&nbsp; &nbs=
p; &nbsp; activesupport (=3D 3.2.4)</div><div>&nbsp; &nbsp; &nbsp; bundler =
(~&gt; 1.0)</div><div>&nbsp; &nbsp; &nbsp; railties (=3D 3.2.4)</div><div>&=
nbsp; &nbsp; rails3-jquery-autocomplete (1.0.10)</div><div>&nbsp; &nbsp; &n=
bsp; rails (~&gt; 3.0)</div><div>&nbsp; &nbsp; railties (3.2.4)</div><div>&=
nbsp; &nbsp; &nbsp; actionpack (=3D 3.2.4)</div><div>&nbsp; &nbsp; &nbsp; a=
ctivesupport (=3D 3.2.4)</div><div>&nbsp; &nbsp; &nbsp; rack-ssl (~&gt; 1.3=
.2)</div><div>&nbsp; &nbsp; &nbsp; rake (&gt;=3D 0.8.7)</div><div>&nbsp; &n=
bsp; &nbsp; rdoc (~&gt; 3.4)</div><div>&nbsp; &nbsp; &nbsp; thor (&gt;=3D 0=
.14.6, &lt; 2.0)</div><div>&nbsp; &nbsp; rake (0.9.2.2)</div><div>&nbsp; &n=
bsp; rb-readline (0.4.2)</div><div>&nbsp; &nbsp; rdoc (3.12)</div><div>&nbs=
p; &nbsp; &nbsp; json (~&gt; 1.4)</div><div>&nbsp; &nbsp; recaptcha (0.3.4)=
</div><div>&nbsp; &nbsp; redcarpet (2.2.2)</div><div>&nbsp; &nbsp; rspec (2=
.11.0)</div><div>&nbsp; &nbsp; &nbsp; rspec-core (~&gt; 2.11.0)</div><div>&=
nbsp; &nbsp; &nbsp; rspec-expectations (~&gt; 2.11.0)</div><div>&nbsp; &nbs=
p; &nbsp; rspec-mocks (~&gt; 2.11.0)</div><div>&nbsp; &nbsp; rspec-core (2.=
11.1)</div><div>&nbsp; &nbsp; rspec-expectations (2.11.3)</div><div>&nbsp; =
&nbsp; &nbsp; diff-lcs (~&gt; 1.1.3)</div><div>&nbsp; &nbsp; rspec-mocks (2=
.11.3)</div><div>&nbsp; &nbsp; rspec-rails (2.11.4)</div><div>&nbsp; &nbsp;=
 &nbsp; actionpack (&gt;=3D 3.0)</div><div>&nbsp; &nbsp; &nbsp; activesuppo=
rt (&gt;=3D 3.0)</div><div>&nbsp; &nbsp; &nbsp; railties (&gt;=3D 3.0)</div=
><div>&nbsp; &nbsp; &nbsp; rspec (~&gt; 2.11.0)</div><div>&nbsp; &nbsp; rub=
yzip (0.9.9)</div><div>&nbsp; &nbsp; sass (3.2.2)</div><div>&nbsp; &nbsp; s=
ass-rails (3.2.5)</div><div>&nbsp; &nbsp; &nbsp; railties (~&gt; 3.2.0)</di=
v><div>&nbsp; &nbsp; &nbsp; sass (&gt;=3D 3.1.10)</div><div>&nbsp; &nbsp; &=
nbsp; tilt (~&gt; 1.3)</div><div>&nbsp; &nbsp; selenium-webdriver (2.26.0)<=
/div><div>&nbsp; &nbsp; &nbsp; childprocess (&gt;=3D 0.2.5)</div><div>&nbsp=
; &nbsp; &nbsp; libwebsocket (~&gt; 0.1.3)</div><div>&nbsp; &nbsp; &nbsp; m=
ulti_json (~&gt; 1.0)</div><div>&nbsp; &nbsp; &nbsp; rubyzip</div><div>&nbs=
p; &nbsp; shoulda-matchers (1.4.1)</div><div>&nbsp; &nbsp; &nbsp; activesup=
port (&gt;=3D 3.0.0)</div><div>&nbsp; &nbsp; simplecov (0.7.1)</div><div>&n=
bsp; &nbsp; &nbsp; multi_json (~&gt; 1.0)</div><div>&nbsp; &nbsp; &nbsp; si=
mplecov-html (~&gt; 0.7.1)</div><div>&nbsp; &nbsp; simplecov-html (0.7.1)</=
div><div>&nbsp; &nbsp; sitemap_generator (3.4)</div><div>&nbsp; &nbsp; &nbs=
p; builder</div><div>&nbsp; &nbsp; slop (3.3.3)</div><div>&nbsp; &nbsp; spr=
ockets (2.1.3)</div><div>&nbsp; &nbsp; &nbsp; hike (~&gt; 1.2)</div><div>&n=
bsp; &nbsp; &nbsp; rack (~&gt; 1.0)</div><div>&nbsp; &nbsp; &nbsp; tilt (~&=
gt; 1.1, !=3D 1.3.0)</div><div>&nbsp; &nbsp; subexec (0.2.2)</div><div>&nbs=
p; &nbsp; therubyracer (0.10.2)</div><div>&nbsp; &nbsp; &nbsp; libv8 (~&gt;=
 3.3.10)</div><div>&nbsp; &nbsp; thor (0.16.0)</div><div>&nbsp; &nbsp; tilt=
 (1.3.3)</div><div>&nbsp; &nbsp; treetop (1.4.12)</div><div>&nbsp; &nbsp; &=
nbsp; polyglot</div><div>&nbsp; &nbsp; &nbsp; polyglot (&gt;=3D 0.3.1)</div=
><div>&nbsp; &nbsp; turn (0.9.6)</div><div>&nbsp; &nbsp; &nbsp; ansi</div><=
div>&nbsp; &nbsp; tzinfo (0.3.34)</div><div>&nbsp; &nbsp; uglifier (1.3.0)<=
/div><div>&nbsp; &nbsp; &nbsp; execjs (&gt;=3D 0.3.0)</div><div>&nbsp; &nbs=
p; &nbsp; multi_json (~&gt; 1.0, &gt;=3D 1.0.2)</div><div>&nbsp; &nbsp; whe=
never (0.7.3)</div><div>&nbsp; &nbsp; &nbsp; activesupport (&gt;=3D 2.3.4)<=
/div><div>&nbsp; &nbsp; &nbsp; chronic (~&gt; 0.6.3)</div><div>&nbsp; &nbsp=
; wicked (0.3.0)</div><div>&nbsp; &nbsp; &nbsp; activesupport (&gt;=3D 3.0.=
7)</div><div>&nbsp; &nbsp; &nbsp; rails (&gt;=3D 3.0.7)</div><div>&nbsp; &n=
bsp; xpath (0.1.4)</div><div>&nbsp; &nbsp; &nbsp; nokogiri (~&gt; 1.3)</div=
><div><br></div><div>PLATFORMS</div><div>&nbsp; ruby</div><div><br></div><d=
iv>DEPENDENCIES</div><div>&nbsp; bcrypt-ruby</div><div>&nbsp; blogit</div><=
div>&nbsp; cancan</div><div>&nbsp; capybara</div><div>&nbsp; client_side_va=
lidations</div><div>&nbsp; coffee-rails (~&gt; 3.2.1)</div><div>&nbsp; comp=
ass-rails</div><div>&nbsp; cucumber-rails</div><div>&nbsp; database_cleaner=
</div><div>&nbsp; email_spec</div><div>&nbsp; execjs</div><div>&nbsp; facto=
ry_girl</div><div>&nbsp; factory_girl_generator</div><div>&nbsp; factory_gi=
rl_rails</div><div>&nbsp; ffaker</div><div>&nbsp; friendly_id (~&gt; 4.0.1)=
</div><div>&nbsp; growl</div><div>&nbsp; guard-livereload</div><div>&nbsp; =
guard-rspec</div><div>&nbsp; hirb</div><div>&nbsp; jquery-rails</div><div>&=
nbsp; launchy</div><div>&nbsp; mini_magick</div><div>&nbsp; minitest</div><=
div>&nbsp; pg</div><div>&nbsp; pg_search</div><div>&nbsp; pry</div><div>&nb=
sp; rails (=3D 3.2.4)</div><div>&nbsp; rails3-jquery-autocomplete</div><div=
>&nbsp; rb-readline</div><div>&nbsp; recaptcha</div><div>&nbsp; rspec-rails=
</div><div>&nbsp; sass-rails (~&gt; 3.2.3)</div><div>&nbsp; selenium-webdri=
ver</div><div>&nbsp; shoulda-matchers</div><div>&nbsp; simplecov</div><div>=
&nbsp; sitemap_generator</div><div>&nbsp; therubyracer</div><div>&nbsp; tur=
n</div><div>&nbsp; uglifier (&gt;=3D 1.0.3)</div><div>&nbsp; whenever</div>=
<div>&nbsp; wicked</div></div><div><br></div><div><br></div><div>OS &nbsp;-=
 Ubunto 11.10</div><div>Ruby version &nbsp;- &nbsp;ruby 1.9.2p290 (2011-07-=
09 revision 32553) [x86_64-linux]</div><div>Raills Version - rails 3.2.4</d=
iv><div><br></div><div>###################database yml###################3<=
/div><div><div># PostgreSQL. Versions 8.2 and up are supported.</div><div>#=
</div><div># Install the pg driver:</div><div># &nbsp; gem install pg</div>=
<div># On Mac OS X with macports:</div><div># &nbsp; gem install pg -- --wi=
th-pg-config=3D/opt/local/lib/postgresql84/bin/pg_config</div><div># On Win=
dows:</div><div># &nbsp; gem install pg</div><div># &nbsp; &nbsp; &nbsp; Ch=
oose the win32 build.</div><div># &nbsp; &nbsp; &nbsp; Install PostgreSQL a=
nd put its /bin directory on your path.</div><div>#</div><div># Configure U=
sing Gemfile</div><div># gem 'pg'</div><div>#</div><div>development:</div><=
div>&nbsp; adapter: postgresql &nbsp;</div><div>&nbsp; database:&nbsp;app_d=
evelopment</div><div>&nbsp; pool: 5</div><div>&nbsp; username:&nbsp;app_app=
</div><div>&nbsp; password:&nbsp;app</div><div>&nbsp; encoding: utf8 &nbsp;=
</div><div>&nbsp; host: localhost</div><div><br></div><div>&nbsp; # Connect=
 on a TCP socket. Omitted by default since the client uses a</div><div>&nbs=
p; # domain socket that doesn't need configuration. Windows does not have</=
div><div>&nbsp; # domain sockets, so uncomment these lines.</div><div>&nbsp=
; #host: localhost</div><div>&nbsp; #port: 5432</div><div><br></div><div>&n=
bsp; # Schema search path. The server defaults to $user,public</div><div>&n=
bsp; #schema_search_path: myapp,sharedapp,public</div><div><br></div><div>&=
nbsp; # Minimum log levels, in increasing order:</div><div>&nbsp; # &nbsp; =
debug5, debug4, debug3, debug2, debug1,</div><div>&nbsp; # &nbsp; log, noti=
ce, warning, error, fatal, and panic</div><div>&nbsp; # The server defaults=
 to notice.</div><div>&nbsp; #min_messages: warning</div><div><br></div><di=
v># Warning: The database defined as "test" will be erased and</div><div># =
re-generated from your development database when you run "rake".</div><div>=
# Do not set this db to the same as development or production.</div><div>te=
st: &amp;test</div><div>&nbsp; adapter: postgresql</div><div>&nbsp; encodin=
g: utf8</div><div>&nbsp; database:&nbsp;app_test</div><div>&nbsp; pool: 5</=
div><div>&nbsp; username:&nbsp;app_app</div><div>&nbsp; password:&nbsp;app<=
/div><div>&nbsp; host: localhost</div><div><br></div><div>production:</div>=
<div>&nbsp; adapter: postgresql</div><div>&nbsp; encoding: utf8</div><div>&=
nbsp; database: app_production</div><div>&nbsp; pool: 5</div><div>&nbsp; us=
ername: app_app</div><div>&nbsp; password: app</div><div>&nbsp; host: local=
host</div><div>cucumber:</div><div>&nbsp; &lt;&lt;: *test</div></div><div><=
br></div><div><br></div><div>&nbsp;</div><blockquote class=3D"gmail_quote" =
style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-l=
eft: 1ex;">&gt;&gt;&gt;
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt; Thanks
<br>&gt;&gt;&gt; &gt;&gt;
<br>&gt;&gt;&gt; &gt;&gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; Code below
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; ######## controller code
<br>&gt;&gt;&gt; &gt;&gt; &gt; class AdminUsersController &lt; ApplicationC=
ontroller
<br>&gt;&gt;&gt; &gt;&gt; &gt; &nbsp; def new
<br>&gt;&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; @admin =3D AdminUser.new
<br>&gt;&gt;&gt; &gt;&gt; &gt; &nbsp; end
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; &nbsp; def index
<br>&gt;&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; @admins =3D AdminUser.all
<br>&gt;&gt;&gt; &gt;&gt; &gt; &nbsp; end
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; &nbsp; def create
<br>&gt;&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; @admin =3D AdminUser.new(param=
s[:admin_<wbr>user])
<br>&gt;&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; if @admin.save
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; redirect_to admin_users=
_path
<br>&gt;&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; else
<br>&gt;&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; render "new"
<br>&gt;&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; end
<br>&gt;&gt;&gt; &gt;&gt; &gt; &nbsp; end
<br>&gt;&gt;&gt; &gt;&gt; &gt; end
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; ######## new view############
<br>&gt;&gt;&gt; &gt;&gt; &gt; &lt;%=3D form_for @admin do|f|%&gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; First Name
<br>&gt;&gt;&gt; &gt;&gt; &gt; &lt;%=3D f.text_field :first_name%&gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; &lt;%=3D submit_tag"Create"%&gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; &lt;% end %&gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; ######## index view############
<br>&gt;&gt;&gt; &gt;&gt; &gt; &lt;%=3D @admins%&gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; ##############model
<br>&gt;&gt;&gt; &gt;&gt; &gt; nothing in model
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; Hope you all understand the problem .
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; Thanks
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; Regards
<br>&gt;&gt;&gt; &gt;&gt; &gt; Fahim Babar Patel
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt; --
<br>&gt;&gt;&gt; &gt;&gt; &gt; You received this message because you are su=
bscribed to the Google
<br>&gt;&gt;&gt; &gt;&gt; &gt; Groups
<br>&gt;&gt;&gt; &gt;&gt; &gt; "Ruby on Rails: Talk" group.
<br>&gt;&gt;&gt; &gt;&gt; &gt; To post to this group, send email to <a>ruby=
onra...@googlegroups.com</a>.
<br>&gt;&gt;&gt; &gt;&gt; &gt; To unsubscribe from this group, send email t=
o
<br>&gt;&gt;&gt; &gt;&gt; &gt; <a>rubyonrails-ta...@<wbr>googlegroups.com</=
a>.
<br>&gt;&gt;&gt; &gt;&gt; &gt; To view this discussion on the web visit
<br>&gt;&gt;&gt; &gt;&gt; &gt; <a href=3D"https://groups.google.com/d/msg/r=
ubyonrails-talk/-/-TdNVrabhvAJ" target=3D"_blank">https://groups.google.com=
/d/<wbr>msg/rubyonrails-talk/-/-<wbr>TdNVrabhvAJ</a>.
<br>&gt;&gt;&gt; &gt;&gt; &gt; For more options, visit <a href=3D"https://g=
roups.google.com/groups/opt_out" target=3D"_blank">https://groups.google.co=
m/<wbr>groups/opt_out</a>.
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt;&gt; &gt;&gt; &gt;
<br></blockquote><div><br></div><div><br></div><div><br></div><div>&nbsp;</=
div>
------=_Part_1684_16528388.1352120043263--

------=_Part_1683_29318936.1352120043262--