Errno::ECONNREFUSED in BookController#list

Issues related to building and deploying Ruby on Rails.
no avatar
prozatanus
 
Posts: 3
Joined: Thu May 29, 2008 5:11 pm
Location: Brasília/Brasil

Errno::ECONNREFUSED in BookController#list

by prozatanus » Mon Jun 16, 2008 5:13 pm

Ok,

Thanks again for the RoR tutorial!

Now I'm having problems with the Views part of the tutorial. I finished the Rails Controllers issue and my file looked like the following:

***book_controller.rb:***

class BookController < ApplicationController

def list
@books = Book.find(:all)
end

def show
@book = Book.find(params[:id])
end

def new
@book = Book.new
@subjects = Subject.find(:all)
end

def create
@book = Book.new(params[:book])
if @book.save
redirect_to :action => 'list'
else
@subjects = Subject.find(:all)
render :action => 'new'
end
end

def edit
@book = Book.find(params[:id])
@subjects = Subject.find(:all)
end

def update
@book = Book.find(params[:id])
if @book.update_attributes(params[:book])
redirect_to :action => 'show', :id => @book
else
@subjects = Subject.find(:all)
render :action => 'edit'
end
end

def delete
Book.find(params[:id]).destroy
redirect_to :action => 'list'
end

def show_subjects
@subject = Subject.find(params[:id])
end

end

**********

Now, when I start the service I can see the correct page on http:localhost:3000

But I found an error (Errno::ECONNREFUSED in BookController#list ) on page:

http://localhost:3000/book/list

Something about not able to find a connection, I don't know!

I could not solve this problem... could anybody give me a light?

no avatar
alton00
 
Posts: 1
Joined: Wed Oct 10, 2012 5:39 pm
Location: uk

nice

by alton00 » Wed Oct 10, 2012 5:55 pm

I finished the Rails Controllers issue and my file looked like the following:

Return to Ruby on Rails