small medium large xlarge

Generic-user-small
12 Jan 2011, 22:41
Martin Ridgeway (3 posts)

I’m getting this error even after retracing all my steps and I’m not sure why.

Here’s the error I see from logging:

Started GET "/users/new" for 127.0.0.1 at Wed Jan 12 16:24:31 -0600 2011
  Processing by UsersController#new as HTML
Completed   in 26ms

ActiveRecord::JDBCError (query does not return ResultSet):
  app/controllers/users_controller.rb:35:in `new'
  app/controllers/users_controller.rb:35:in `new'

I created the scaffolding and migrated the db but, it looks like data initialization is failing?

Generic-user-small
12 Jan 2011, 22:40
Martin Ridgeway (3 posts)

I forgot to add the line in the code where it’s failing:

users_controller.rb on line 35

 # GET /users/new
  # GET /users/new.xml
  def new

    @user = User.new    <----- line 35

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @user }
    end
  end
Generic-user-small
13 Jan 2011, 15:23
Martin Ridgeway (3 posts)

OK, apparently I have self correcting code.

I guess a server restart was needed since all i did was shutdown last night and restart this morning.

You must be logged in to comment