Chapter 6 - Using the database

59 views
Skip to first unread message

George Constantin

unread,
Jan 15, 2018, 4:12:14 AM1/15/18
to Cucumber and Cheese
Hi, 

Thank you for the work you have done with this book, it is of great help to any beginner. :) 

I`ve reached chapter 6 of the book and I get a server error when I start the rails server and then I navigate to the local host.

Please see below the terminal output:

F:\RM\puppies>rails s
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-3.2.11/lib/active_support/values/time_zone.rb:270: warning: circular argument
 reference - now
=> Booting WEBrick
=> Rails 3.2.11 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2018-01-15 10:57:48] INFO  WEBrick 1.3.1
[2018-01-15 10:57:48] INFO  ruby 2.4.2 (2017-09-14) [x64-mingw32]
[2018-01-15 10:57:48] INFO  WEBrick::HTTPServer#start: pid=10172 port=3000


Started GET "/" for 127.0.0.1 at 2018-01-15 10:58:09 +0200
Connecting to database specified by database.yml
Processing by AgencyController#index as HTML
  Rendered agency/index.html.erb within layouts/application (22.8ms)
Completed 500 Internal Server Error in 93ms


Started GET "/" for 127.0.0.1 at 2018-01-15 10:58:10 +0200
Processing by AgencyController#index as */*
  Rendered agency/index.html.erb within layouts/application (3.5ms)
Completed 500 Internal Server Error in 31ms

Also my agency_controller.rb looks as below:

class AgencyController < ApplicationController
skip_before_filter :authorize

def index
@puppies = Puppy.order(:name).paginate(page: params[:page], per_page: 4)
end

end

 
Any help is much appreciated.

George

Carlito GZ

unread,
Jan 26, 2018, 6:24:46 AM1/26/18
to Cucumber and Cheese
@cheezy I think you're best placed to answer this
Reply all
Reply to author
Forward
0 new messages