Image Not Displaying In Paperclip

See comments inserted below

Colin Law wrote in post #1171724:

Exactly which folder is the file 8-captives-medium.jpg stored in? Full path please.

On the view page in the browser do you see "8 captives medium" where the image should be?

Post the bit of development.log showing the request for the view page please.

Please answer all three questions to save me asking again. Thanks.

Colin

Answer 1:- app/public/images/posts/images.jpg

If you had inserted your comment immediately below my question it would have saved you typing. So when I asked "does that file exist" meaning 8-captives-medium.jpg and you said yes, then actually meant you meant there is a file called images.jpg but not one of the expected name.

Answer 2:- http:// prntscr.com /6rgtxn (Remove Spaces)

"Yes" would have done

Answer 3:- Started GET "/books/new" for 127.0.0.1 at 2015-04-07 11:51:02 +0530   [1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m Processing by BooksController#new as HTML Completed 500 Internal Server Error in 38ms (ActiveRecord: 0.7ms)

NoMethodError (undefined method `validation_presence_of' for #<Class:0xa478d1c>):   app/models/book.rb:2:in `<class:Book>'   app/models/book.rb:1:in `<top (required)>'   app/controllers/books_controller.rb:17:in `new'

So when you said "and yea i have checked log file for errors NO ERROR" then that was not entirely correct.

  Rendered /home/amit/.rvm/gems/ruby-2.2.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/_source.erb

And that shows the html that you posted containing the image tag? Unlikely I think.

No time at the moment, will look again later.

Colin

Look at the line pointed to carefully and consider whether what is there is exactly what was intended. Compare it carefully with other examples showing similar code. When writing software, to coin a phrase, the devil is in the detail.

Any comments on the points I made in my last post?

Colin

Colin Law wrote in post #1171817:

Colin Law wrote in post #1171817:

NoMethodError (undefined method `validation_presence_of' for #<Class:0xa478d1c>):   app/models/book.rb:2:in `<class:Book>'

Look at the line pointed to carefully and consider whether what is there is exactly what was intended. Compare it carefully with other examples showing similar code. When writing software, to coin a phrase, the devil is in the detail.

Any comments on the points I made in my last post?

Colin

And that is what exactly i asked for in the beginning. i did said that same program working on my frnds pc with no error but errors showing up in validation, can i get a proper validation code ?

As I said:

Look at the line pointed to carefully and consider whether what is there is exactly what was intended. Compare it carefully with other examples showing similar code. When writing software, to coin a phrase, the devil is in the detail.

Try looking for documentation for validation_presence_of for example. I doubt if you will find any. If you manage to progress in the art of writing software you will eventually realise the truth of my statement - the devil is in the detail.

As or that code working on another PC I think that is unlikely.

Colin

That should have read 'as for that code working' of course. I got the detail wrong myself that time.

Colin