Hello, it is that every time I give the migration it throws an error and it does not let me do the migration.
https://github.com/thoughtbot/paperclip
gem "paperclip", "~> 5.0.0"
gem "spring", group: :development
the gems that I have installed.
What the error says is that you must specify in your migrations the version of Rails you are working with; you do this by adding the version in brackets directly in the class you inherit from
ActiveRecord::Migration
; for example, the error message shows how to do it forRails 4.2
:In your case, that you are using the version
5.1.1
then you would do the following:The file you must edit is: db/migrate/20170822195101_add_attachment_avatar_to_productossnack.rb ; which was generated when you ran the command:
I can't comment yet but helping you with your comment in the previous question would be in this way the way to build the migration.
Command: