The recent readmine speed is getting slower. Online check, the server webrick its own replaced with mongrel, you can solve this problem, the specific operation method as follows, method:
Gem Install Mongrel
If the prompt resembles "
http11.c:in function ' Header_done ': http11.c:172:13:error: ' struct RString ' has no member named ' PTR ' Http11.c:172:13:e Rror: ' struct RString ' has no member named ' PTR ' http11.c:172:13:error: ' struct RString ' have no member named ' PTR ' Http11 . C:174:89:error: ' struct RString ' has no member named ' PTR ' http11.c:176:52:error: ' struct RString ' have no member named ' PTR ' http11.c:177:26:error: ' struct RString ' has no member named ' Len ' http11.c:in function ' httpparser_execute ': HTTP1 1.c:298:23:error: ' struct RString ' has no member named ' PTR ' http11.c:299:23:error: ' struct RString ' have no member named ' Len ' Http11.c:307:5: Warning:format not a string literal and no format arguments [-wformat-security] Make: * * * [HTTP11. O] Error 1
Or something like that, you need to do it first.
sudo gem install mongrel--pre
Install mongrel instead of Webrick and encounter the following issues (Ruby version 1.9.2 rails version 3.1.3)
Error:error Installing Mongrel:
Error:failed to build gem native extension.
The reason is that mongrel 1.1.5 is incompatible with Ruby 1.9.x. You can install a different version by installing
Gem Install mongrel--pre
Or
Gem install mongrel-v 1.2.0.pre2--pre--sourcehttp://ruby.taobao.org
Successfully installed
After the installation is complete, run:
[Email protected] redmine-2.1.2]# Ruby script/rails server mongrel-e production-d-p9042
/usr/local/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/handler/mongrel.rb:1:in ' require ': Cannot load such file-- Mongrel (Loaderror)
From/usr/local/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/handler/mongrel.rb:1:in "
From/usr/local/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/handler.rb:20:in ' Const_get '
From/usr/local/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/handler.rb:20:in ' block in Get '
From/usr/local/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/handler.rb:20:in ' Each '
From/usr/local/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/handler.rb:20:in ' inject '
From/usr/local/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/handler.rb:20:in ' Get '
From/usr/local/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:269:in ' Server '
From/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands/server.rb:59:in ' Start '
From/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:55:in ' block in '
From/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:50:in ' Tap '
From/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:50:in "
From Script/rails:6:in ' require '
From Script/rails:6:in '
[[email protected] redmine-2.1.2]#/mongrel.rb:1:in ' require ': Cannot load such file--Mongrel (Loaderror)
Still the same error. The following actions are required:
Redmine folder Find Gemfile file, open to add the following sentence
Gem ' mongrel ', ' ~> 1.2.0.pre2 '
2. Operation
It's much faster than it used to be.