railsでpaperclipを導入したいのですが、
ターミナルで
$ rails g paperclip user avatar
と打ったあと
$ bundle exec rake db:migrate
と打つと
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
class AddAttachmentAvatarToUsers < ActiveRecord::Migration[4.2]
/Users/hyjs0214/projects/sports-comics/db/migrate/20170825020845_add_attachment_avatar_to_users.rb:1:in <top (required)>' /Users/hyjs0214/.rbenv/versions/2.3.1/bin/ruby_executable_hooks:15:in
eval'
/Users/hyjs0214/.rbenv/versions/2.3.1/bin/ruby_executable_hooks:15:in `<main>'
StandardError: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
class AddAttachmentAvatarToUsers < ActiveRecord::Migration[4.2]
/Users/hyjs0214/projects/sports-comics/db/migrate/20170825020845_add_attachment_avatar_to_users.rb:1:in <top (required)>' /Users/hyjs0214/.rbenv/versions/2.3.1/bin/ruby_executable_hooks:15:in
eval'
/Users/hyjs0214/.rbenv/versions/2.3.1/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
とエラーが出てしましいました。
これは何が原因でどう処理すれば良いのでしょうか?
わかる方お力を貸して頂けると助かります。宜しくお願い致します。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/08/25 03:17
2017/08/25 04:30
2017/08/25 04:46