www.tutorialspoint.com Forum Index
Register FAQMemberlistUsergroupsTutorials PointLog in
Reply to topic Page 1 of 1
Errno::ECONNREFUSED in BookController#list
Author Message
Reply with quote
Post Errno::ECONNREFUSED in BookController#list 
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?

View user's profile Send private message MSN Messenger
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum