質問編集履歴

2

追加

2018/07/22 16:52

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -30,13 +30,29 @@
30
30
 
31
31
  Mysql2::Error: Error on rename of './heroku_89832e8d2f661b7/#sql-149d1_b39a500e' to './heroku_89832e8d2f661b7/book_photos' (errno: 150): ALTER TABLE `book_photos` CHANGE `book_id` `book_list_id` int(11) NOT NULL
32
32
 
33
- /app/vendor/bundle/ruby/2.3.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:80:in `_query'
33
+ //app/vendor/bundle/ruby/2.3.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:80:in `_query'
34
34
 
35
35
  /app/vendor/bundle/ruby/2.3.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:80:in `block in query'
36
36
 
37
37
  /app/vendor/bundle/ruby/2.3.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:79:in `handle_interrupt'
38
38
 
39
39
  /app/vendor/bundle/ruby/2.3.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:79:in `query'
40
+
41
+ /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:218:in `block in execute'
42
+
43
+ /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:589:in `block in log'
44
+
45
+ /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.2/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
46
+
47
+ /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:583:in `log'
48
+
49
+ /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:218:in `execute'
50
+
51
+ /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/mysql/database_statements.rb:31:in `execute'
52
+
53
+ /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:500:in `rename_column'
54
+
55
+ ・・・(以下省略)
40
56
 
41
57
  ```
42
58
 

1

誤字脱字の修正

2018/07/22 16:52

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -4,11 +4,11 @@
4
4
 
5
5
  こんにちは!Rails歴1年(独学)の者です。現在、参考書のタスク管理アプリ(どこまで読んだか、みたいな物を記録するアプリ)を個人で開発しており、上記のサイトを参考にしHerokuでRailsアプリのStaging環境をデプロイをしております。
6
6
 
7
- Herokuの設定などは順調に進みました。
7
+ Herokuの設定(MySQLの設定)などは順調に進みました。
8
8
 
9
9
 
10
10
 
11
- そこで1つ質問があるのですが、heroku rake db:migrate RAILS_ENV=staging のコマンドを叩くと以下のようなエラーが出ます。
11
+ そこで1つ質問があるのですが、heroku run rake db:migrate RAILS_ENV=staging のコマンドを叩くと以下のようなエラーが出ます。
12
12
 
13
13
  ちなみに、ローカル環境のDB(development)ではエラーは出なく、migrateコマンドを実行できます。
14
14