Thank you for your help.
I was trying to upload the image to AWS S3 using carrierwave in Rails, but I would like to ask you to let me know.
https://qiita.com/junara/items/1899f23c091bcee3b058#s3%E3%83%90%E3%82%B1%E3%83%83%E3%83%88%E4%BD%9C%E6%88%90
Prerequisite
What do you want to solve
After adding the photo model and configuring the image column,
rakedb:migrate?
rails db —migrate?
Directly inheriting from ActiveRecord:: Migration is not supported. Please specify the Rails release the migration was written for:
Direct inheritance of ActiveRecord::Migration is not supported.Specify the Rails release with the migration written on it.
and errors.
What I looked into myself
Searched Directly Inheriting from ActiveRecord::Migration is not supported.
https://qiita.com/baby-0105/items/184048e18a8b1de93a31
The results of hypotheses and validations
The following did not resolve the issue:
$rails db:migrate:reset
$ rails db:migrate
Are there times when migration is not possible due to different versions?
Please let me know.
①https://gyazo.com/477cef32b2d842fa0e6e3bffeb373048
②https://gyazo.com/a1a68a7984ba9c1a97c59d10c29325d2
%ruby-v
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin19]
% rails-v
Rails 6.0.3.4
% gem-v
3.0.3
class CreatePhotos<ActiveRecord::Migration
and
I think I could only write around Rails 4 or 5.0.
Here
class CreatePhotos<ActiveRecord:Migration [6.0]
I think it would be good to try rails db:migrate again
924 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
623 Uncaught (inpromise) Error on Electron: An object could not be cloned
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
614 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.