title: 1 error prohibited this book from being saved
body: <p>I have been facing problem while creating new book.
  User is logged in but still it says:</p>
  
  <p>1 error prohibited this book from being saved</p>
  
  <ul>
  <li>User must exist</li>
  </ul>
  
  <p>When i edit my book it works fine but when i try to create new book it shows .error/</p>
  
  <p>This is book controller:</p>
  
  <pre><code>    class BooksController &lt; ApplicationController
       before_action :find_book, only:[:show, :edit, :update, :destroy, :upvote]
      before_action :authenticate_user!
    def index
      @books = Book.all.order('created_at DESC')
    end
  
  
    def show
    end
  
    def edit
    end
  
    def update
      if @book.update(book_params)
          redirect_to @book
      else
          render 'edit'
      end
  end
  def destroy
  @book.destroy
  redirect_to root_path, notice: "successfully deleted"
  end
  
  def new
      @book =Book.new
  
  end
  
  def create
      @book =Book.new(book_params)
      if @book.save
          redirect_to @book
      else
          render 'new'
      end
  end
  
  private
  
  def find_book
      @book=Book.find(params[:id])
  end
  
      def book_params
         params.require(:book).permit(:title, :description, :image)
      end
  end
  </code></pre>
  
  <p>My books.rb is:</p>
  
  <pre><code> class Book &lt; ApplicationRecord
    #Paperclip.options[:command_path] = 'C:\Program Files\ImageMagick-7.0.5-Q16'
     has_attached_file :image, styles: { }
     do_not_validate_attachment_file_type :image
    #validates_attachment_content_type :image, content_type: /\Aimage\/.*\z/
    belongs_to :user
  end 
  </code></pre>