最近readmine速度越来越慢。网上查了一下,把其自带的服务器webrick 换成为mongrel,可以解决这个问题,具体操作方法如下,方法:

gem install mongrel

如果提示类似“

http11.c: In function ‘header_done’: http11.c:172:13: error: ‘struct RString’ has no member named ‘ptr’ http11.c:172:13: error: ‘struct RString’ has no member named ‘ptr’ http11.c:172:13: error: ‘struct RString’ has no member named ‘ptr’ http11.c:174:89: error: ‘struct RString’ has no member named ‘ptr’ http11.c:176:52: error: ‘struct RString’ has no member named ‘ptr’ http11.c:177:26: error: ‘struct RString’ has no member named ‘len’ http11.c: In function ‘HttpParser_execute’: http11.c:298:23: error: ‘struct RString’ has no member named ‘ptr’ http11.c:299:23: error: ‘struct RString’ has 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

之类的错误的话,需要先执行一下

sudo gem install mongrel --pre

安装mongrel替代webrick,遇到如下问题(ruby版本1.9.2  rails版本3.1.3)

ERROR:  Error installing mongrel:
ERROR: Failed to build gem native extension.


原因在于Mongrel 1.1.5与Ruby 1.9.x 不兼容。可以通过安装另个版本

gem install mongrel  --pre

或者

gem install mongrel -v 1.2.0.pre2 --pre --sourcehttp://ruby.taobao.org

成功安装

安装完后运行:

[root@yyzctest 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 `'
[root@yyzctest redmine-2.1.2]# /mongrel.rb:1:in `require': cannot load such file -- mongrel (LoadError)
还是一样报错.需要做如下操作:

redmine  文件夹下找到gemfile 文件,打开加入下面一句

gem 'mongrel','~> 1.2.0.pre2'

2、运行
[root@yyzctest redmine-2.1.2]# ruby script/rails server mongrel -e production -d -p9042
=> Booting Mongrel
=> Rails 3.2.8 application starting in production on http://0.0.0.0:9042
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require': iconv will be deprecated in the future, use String#encode instead.
[root@yyzctest redmine-2.1.2]#
 
速度比以前快多了

redmine慢---提速方法的更多相关文章

  1. [转]用国内软件源为Ubuntu的apt-get提速方法

    FROM : http://www.jb51.net/os/Ubuntu/45293.html 刚装好Ubuntu系统之后根据需要还要安装一系列的软件,最省心的办法就是通过apt-get来进行   默 ...

  2. Matlab提速方法

    1. 向量化. 尽量少用for循环. 2. 循环竖着走比横着走快. 3. 内置函数也有优化的空间 不少内置函数都有大量的error check.直接用profiler找出真正干活的.不少内置函数在网上 ...

  3. 【INSERT】逐行提交、批量提交及极限提速方法

    在Oracle数据库中,不是提交越频繁越好.恰恰相反,批量提交可以得到更好的性能.这篇文章给大家简单展示一下在Oracle数据库中逐行提交于批量提交两者之间的性能差别.最后再给出一种可以极大改变性能的 ...

  4. pip 提速方法

    Python 包管理软件 pip 在默认情况下,下载安装 Python 包太慢,容易失败.以下给出解决方案. pip install 的选项说明如下: Package Index Options: - ...

  5. 国内Docker下载镜像提速方法之一

    众所周知,Docker Hub并没有在国内部署服务器或者使用国内的CDN服务,因此在国内特殊的网络环境下,镜像下载十分耗时.为了克服跨洋网络延迟,能够快速高效地下载Docker镜像,我采用了DaoCl ...

  6. npm下载模块提速方法

    通过config配置指向国内镜像源,命令如下 npm config set registry https://registry.npm.taobao.org 然后可以查看是否配置成功 npm conf ...

  7. 第三十二课:JSDeferred的性能提速

    大家如果看了前面两课,就知道Deferred的静态方法next(next_default)是用setTimeout实现的(有浏览器最小时钟间隔).但是实现这种异步操作,可以有很多种方法.JSDefer ...

  8. Discuz论坛提速优化技巧

    Discuz是国内最受站长们欢迎的建站源码之一,除了开源以外还有着很强大的后台,即便是没有建站基础和不懂代码的站长也能很快的架设出一个论坛,甚至是门户. 一个网站的加载速度除了影响你在搜索引擎里的排名 ...

  9. 【转】爬虫的一般方法、异步、并发与框架scrapy的效率比较

    该文非原创文字,文字转载至  jclian91  链接:https://www.cnblogs.com/jclian91/p/9799697.html Python爬虫的N种姿势   问题的由来    ...

随机推荐

  1. FPGA 设计技巧

    1.  资源共享的应用限制在同一个module里 这样 综合工具才能最大限度地发挥其资源共 享综合作用 2.  尽可能将Critical path上所有相关逻辑放在同一个module里 这样 综合工具 ...

  2. 搭建appium的android环境

    首先需要准备: 1.jdk(步骤不再啰嗦) 2.android SDK,下载地址:http://developer.android.com/sdk/index.html,下载sdk tools,可能需 ...

  3. 2014 Super Training #4 G What day is that day? --两种方法

    原题: ZOJ 3785 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3785 题意:当天是星期六,问经过1^1+2^2+ ...

  4. Loadrunner:场景运行较长时间后报错:Message id [-17999] was not saved - Auto Log cache is too small to contain the message.

    loadrunner运行时间较长后,跑数据过程老是失败,有如下error: Message id [-17999] was not saved - Auto Log cache is too smal ...

  5. TestLink学习一:Windows搭建Apache+MySQL+PHP环境

    PHP集成开发环境有很多,如XAMPP.AppServ......只要一键安装就把PHP环境给搭建好了.但这种安装方式不够灵活,软件的自由组合不方便,同时也不利于学习.所以我还是喜欢手工搭建PHP开发 ...

  6. CSS3中的字体rem

    rem和em都是相对单位,em相对父元素的font-size来计算,而rem是根据文档根元素(html)的font-size大小来计算的 通常将html的字体大小设为62.5%(等于10px),当然也 ...

  7. 26Mybatis_一级缓存及其测试

    这篇文章讲解一级缓存: 先介绍一级缓存的原理:

  8. 微软职位内部推荐-Software Development Engineering II

    微软近期Open的职位: Job Title: Software Development Engineering II Work Location: Suzhou, China Enterprise ...

  9. U3D Debug.log的问题

    今天在测试有yield有关的问题时,发现Debug.log()是异步输出机制.不一定会在调用后立即执行. 在C++有类似问题:std::cout 也不一定会立即输出,加上"\n"或 ...

  10. 基于React Native的Material Design风格的组件库 MRN

    基于React Native的Material Design风格的组件库.(为了平台统一体验,目前只打算支持安卓) 官方网站 http://mrn.js.org/ Github https://git ...