Benjamin Crouzier
Benjamin Crouzier

Reputation: 41925

Rails commands on windows have a delay before execution

I am using Ruby on Rails under windows, installed with railsinstaller. Everything works fine, except that any command such as rails console or bundle exec rake db:migrate takes on average 8 seconds before executing. (rails s and rails -v are exceptions and take about 1 to 2 sec to launch, which is still abnormally high). I am not talking about the time of the entire command, just the time between when I hit enter and when I see the first output.

During this time, one core of my processor is working at 100%, and there is no load on the hard drive. I really feel like that I am waiting for some kind of timeout to expire, because I don't see why rails console should take that much processing power (I have a Core 2 Duo processor).

Do you have experienced this kind of problem ? What can it be ? How can I investigate this ?

Upvotes: 0

Views: 176

Answers (1)

EricM
EricM

Reputation: 754

It is spinning up your Rails environment, not just loading an executable. It is not Windows specific. It takes about 10 seconds on my Core2 Duo iMac. I've seen similar delays on Linux boxes. Here is an article that gives some hints that may help.

rails-3-osx-speed-up-console-loading-time

Upvotes: 1

Related Questions