Rails and Rake commands freeze and do nothing

I don't know why, but when I run the rake commands in my rails project, nothing happens. Also, the rails server does nothing. Any suggestions?

+6
ruby ruby-on-rails
source share
5 answers

The solution for me is to exit the rails console -sandbox console.

I think the sandboxing console is putting some kind of lock into the database.

+1
source share

You can try adding the --trace argument to your rake calls to see if it sheds light on where it gets stuck. Otherwise, the logs may contain some information.

This suggests that something got stuck while setting up an environment that could be added to environment.rb .

0
source share

you can add "ruby -rtracer" to the top to see where it hangs.

0
source share

Do you use rvm?

These days there are many tips for installing ruby ​​inside rvm and rails in remm gemset. If you have done this, you need to remember commands like these at the beginning of a terminal session:

 rvm use 1.9.3 rvm gemset use ruby193rails3 

I found that if I forgot to do this, the rake command, even a simple rake --version , freezes and thrash disk.

... that everything seems a little fragile. I assume that it is fixed on a part of the rails, but with some files missing due to the fact that rvm did not move them into place or something like that.

0
source share

Spring has a bug in Rails 4.1 that also raises this (and not a date based OP question). For these googling, I solved this problem by typing "spring stop". Spring will automatically restart the next time the rails start. To give credit, I found this information from this blog: http://www.dixis.com/?p=754

0
source share

All Articles