开发者

Rails app getting Illegal Instruction every time I change logic

I have a fairly large Rails app that is getting increasingly harder to develop on. The development environment has gotten slower and slower and WeBrick is taking forever to start up.

The oddest thing however, is that whenever I change code in the logic (controllers or models), the server crashes with an 'Illegal Instruction' so I have to restart the server every time I change something. This doesn't happen when I change the views.

The code works just fine every time I restart as well as in our production environment.

I'm fairly new to web development, only been doing it for a year. It's very possible I'm making some sort of mistake that is causing an overflow or something faulty in the binary that the cpu can't handle it. Could that be the case even though the code seems to work just fine and have the correct expected outcome?

Also, could someone direct me towards finding ways to speed up my development environment. It's starting to get ridiculous. It's only for this particular repository.

It's a Rails 3.0.4 app using Ruby 1.9.2-p136 with MYSQL db. Usin开发者_JAVA百科g the rails engine 'spree' which is the majority of the code base. WEBrick is the development server.


The first thing I would do is to abandon WEBrick since its performances very poor. You'll find a lot of articles online on why it is so and almost all of them advice not to use it in a production environment, especially if your app is large enough. I could suggest thin + nginx, since I use them and have really nothing to complain about, but a final choice could depend on so many parameters, that I strongly suggest you to first document yourself on the different possibilities out there (and there are a lot!).

With regard to the illegal instruction issue, please notice that you're using a quite "bleeding edge" mix of RoR end Ruby with WEBrick that is not known for its stability! Choosing for a more conservative solution (e.g. Ruby 1.8.7?) and dismissing WEBrick should really solve this problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜