NoMethodError in Books#index
undefined method `buy_book_path' for #<ActionView::Base:0x64a45b0>
why i'm getting this error?
Because the name of the route is buy_books (because you've said that
the buy verb applies to the collection of books as a whole).
If you change your routes stuff to :member => {:buy => :get} then
you'll get buy_book instead of buy_book. (Remember that you can see
the names of all the routes by running rake routes)