0

I have an application in rails 4.2.7.1, when I run the db:migrate in test in works perfectly

➜ bundle exec rake db:drop RAILS_ENV=test

➜ bundle exec rake db:ceate RAILS_ENV=test

➜ bundle exec rake db:migrate RAILS_ENV=test

But when I ran it in development, only the last migration or beginning from a drop database after executing firs migration I get this:

➜ bundle exec rake db:migrate -- --trace
== 20191112204156 MyNewModel: migrating ==============================
-- create_table(:global_clients)
   -> 0.0121s
== 20191112204156 MyNewModel: migrated (0.0122s) =====================

rake aborted!
SystemStackError: stack level too deep

Tasks: TOP => db:migrate
(See full trace by running task with --trace)

I'm using ruby 2.1.6, and mysql 0.318 and later 0.4.10, I did rvm implode to start it again and nothing happens. I do not know how to solve it, even I do not know how to debug it. So any tips will be good.

It's a problem with dthe difference from rais test and development environments

anquegi
  • 11,125
  • 4
  • 51
  • 67
  • Try to upgrade to Rails 4.2.8 - https://stackoverflow.com/a/41504382/9269043 – Vasilisa Nov 13 '19 at 09:23
  • 1
    About debugging - try to find the same issue in gems which you are using ONLY in dev env – Vasilisa Nov 13 '19 at 09:24
  • @Vasilisa, thanks for this tip, you where absolutely right, I added the development gems to group test gems, and failed in test environment, then updating I found the problem with bullet gem – anquegi Nov 13 '19 at 10:13
  • Possible duplicate of [Ruby 2.4 and Rails 4 stack level too deep (SystemStackError)](https://stackoverflow.com/questions/41504106/ruby-2-4-and-rails-4-stack-level-too-deep-systemstackerror) – Vasilisa Nov 14 '19 at 06:29

0 Answers0