Rails DB rails run but never exit

When I run any of the rake db tasks that Rails provides, they start successfully but never finish. I have CTRL + C to exit the task. I tested it for more than 8 hours and the problem persists.

Here's the output if I ran rake db:migrate --trace :

 ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Invoke db:load_config (first_time) ** Invoke rails_env (first_time) ** Execute rails_env ** Execute db:load_config ** Execute db:migrate ** Invoke db:schema:dump (first_time) ** Invoke db:load_config ** Execute db:schema:dump _ 

As I said, everything works as expected, but it hangs after db:schema:dump .

I am using the following:

  • Mac OS X 10.7.1 (Lion)
  • Ruby 1.9.2p290
  • Rails 3.1.0
  • MySQL 5.5.14
  • mysql2 gem 0.3.7

I also want to note that this is a basic Rails application without adding gems / code. I can replicate rails new testapp -d mysql , then rake db:create or bundle exec rake db:create .

Does anyone encounter this problem or know what I can do to further troubleshoot?

+7
source share
2 answers

I fixed the problem.

First, I tried to uninstall the version of MySQL that was installed using the official binary, and then reinstall using Homebrew. It did nothing.

Then I performed a brew update, restarted MySQL, and tried again. Eureka! It worked.

The culprit seems to have been a bug in an older version of one of the following:

 libiconv glib gtk+ 

These were the only formulas that were updated.

+1
source

The same thing happens to me, but donโ€™t worry, I tried updating the package after that, I never encountered this problem.

0
source

All Articles