質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.46%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

解決済

1回答

927閲覧

migrate後の表示について

GAD0244

総合スコア33

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

0グッド

0クリップ

投稿2020/04/07 01:56

railsでmigrateすると下記のような表示が出てきます。
一応テーブルは作られてるみたいなので問題はないのかも知れませんが、この後モデルを作成しても似たような現象が起きるので気になってます。

何やら色々と警告されてるみたいなのですが、warningの量が多すぎて理解できないでいます。
原因わかる方居られましたらごきょう

[vagrant@localhost myblog]$ rails db:migrate /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/stack.rb:35: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/static.rb:109: warning: The called method `initialize' is defined here /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract_adapter.rb:82: warning: deprecated Object#=~ is called on Integer; it always returns nil /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.1.7/lib/active_record/connection_adapters/sqlite3_adapter.rb:570: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract/schema_definitions.rb:219: warning: The called method `initialize' is defined here /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.1.7/lib/active_record/schema_migration.rb:28: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract/schema_definitions.rb:187: warning: The called method `string' is defined here /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract/schema_definitions.rb:322: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract/schema_definitions.rb:371: warning: The called method `new_column_definition' is defined here /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract/schema_creation.rb:17: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract/schema_statements.rb:1062: warning: The called method `type_to_sql' is defined here /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.1.7/lib/active_record/internal_metadata.rb:35: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract/schema_definitions.rb:187: warning: The called method `string' is defined here /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.1.7/lib/active_record/transactions.rb:210: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract/database_statements.rb:228: warning: The called method `transaction' is defined here /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract/transaction.rb:126: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract/transaction.rb:47: warning: The called method `initialize' is defined here == 20200401195824 CreatePosts: migrating ====================================== -- create_table(:posts) /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract/schema_statements.rb:278: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.1.7/lib/active_record/connection_adapters/sqlite3/schema_definitions.rb:5: warning: The called method `primary_key' is defined here -> 0.0024s == 20200401195824 CreatePosts: migrated (0.0025s) ============================= /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activemodel-5.1.7/lib/active_model/type/integer.rb:11: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activemodel-5.1.7/lib/active_model/type/value.rb:6: warning: The called method `initialize' is defined here

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

warningの量が多すぎて理解できないでいます。

多すぎて理解できないというのは、考えるのをやめていることが多いです。
1行ずつに分解して、エラーを追っていく癖をつけることをおすすめします。


と前置きは長くなりましたが、1行目のエラー文を検索しました。

検索キーワード:Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call

検索結果1つ目
https://tech.recruit-mp.co.jp/server-side/post-19932/

1行目は下記の通りactionpackについてのエラーなので、まずは上記リンクの該当部分を見てみてください。
/home/vagrant/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/stack.rb:35:

投稿2020/04/07 08:56

編集2020/04/07 08:56
no1knows

総合スコア3365

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

GAD0244

2020/04/07 09:31

no1knowsさま、コメントありがとうございます!確かにwarningの多さに心が折れていました。。。 教えていただいた参考サイト見ながら自力解決できるよう頑張ります!
no1knows

2020/04/07 09:59 編集

ザクッと説明するとRuby2.7だとアプリが問題なくても依存関係などの兼ね合いからワーニングがたくさん出るよということです。 個人的には、今はRuby2.6で構築しておいて、次のバージョンがruby3.0(になる予定)なので、それを待ったほうが良いと思います。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.46%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問