Open Souravgoswami opened 4 years ago
after doing those changes , I got this message
C:\Users\Admin\Desktop\Ruby\instagrameme>rails db:environment:set RAILS_ENV=development db:migrate == 20220205102326 AddAttachmentImageToPics: migrating ========================= -- change_table(:pics) rails aborted! StandardError: An error has occurred, this and all later migrations canceled:
wrong number of arguments (given 3, expected 2) C:/Users/Admin/Desktop/Ruby/instagrameme/db/migrate/20220205102326_add_attachment_image_to_pics.rb:4:in
block in up' C:/Users/Admin/Desktop/Ruby/instagrameme/db/migrate/20220205102326_add_attachment_image_to_pics.rb:3:in
up'Caused by: ArgumentError: wrong number of arguments (given 3, expected 2) C:/Users/Admin/Desktop/Ruby/instagrameme/db/migrate/20220205102326_add_attachment_image_to_pics.rb:4:in
block in up' C:/Users/Admin/Desktop/Ruby/instagrameme/db/migrate/20220205102326_add_attachment_image_to_pics.rb:3:in
up' Tasks: TOP => db:migrate (See full trace by running task with --trace)
Did you solved this issue? I have the exact same problem with Rails[7.0]
Did you solved this issue? I have the exact same problem with Rails[7.0]
NO. I am also getting the same issue
Deprecation notice
Paperclip is currently undergoing deprecation in favor of ActiveStorage. Maintainers of this repository will no longer be tending to new issues. We're leaving the issues page open so Paperclip users can still see & search through old issues, and continue existing discussions if they wish.
I know this is deprecated, but I am doing a course where I have to use this gem instead of ActiveStorage or Carrierwave.
The problem is, in Rails 6.0, whenever I run
rails db:{drop,create,migrate}
I get:The issue can be fixed simply by modifying the migration file, and add
[6.0]
beside ActiveRecord::Migration, for me it's something like this:And then run:
This is a temporary fix that has to be followed every time I create migration...