开发者

Problems in using web server mongrel for rails 3

I am using JRuby 1.6.1(ruby 1.8.6) in Rails 3.0.6 environment.

Tried to use mongrel 1.1.5 but its crashing with no errors on conso开发者_如何学Gole.

Any suggestions?

Thanks for your time.

Thanks and Regards, SachinJadhav.


To deploy JRuby web applications like Rails, or Sinatra apps, it is usual to use a Java application server to serve requests; e.g. Tomcat, GlassFish or Jetty.

In practice, this means that you need to deploy in a manner that is different from what you might be used to with MRI Ruby apps that use Passenger and a number of Mongrel processes.

Whilst Mongrel is a fine piece of work, I would suggest that you don't use Mongrel to deploy JRuby web apps, and investigate popular Java/JVM alternatives. Apart from the greater compatibility with the JVM, another reason to use a Java application server is to reduce the number of JVMs (and memory) that are running.

With Rails running in threadsafe mode you can have one JVM instance and a single JRuby runtime servicing many concurrent requests. This is one of the advantages of JRuby.

For many of these application servers, you do not have to setup and install these yourself, since they can be run from Ruby gems. For example, an embedded version of the Tomcat server is included in the Trinidad gem.


I don't know what you mean by "crashing"; it is difficult to know for certain without looking at stack trace and whatnot. If it is indeed crashing, then we should fix it.

However, you should not use mongrel on Rails 2.3.8 (and later) or Rails 3.

https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4690-mongrel-doesnt-work-with-rails-238

As Scott said, use something else. Especially on JRuby.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜