<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d4684235500622716427\x26blogName\x3dCaiwangqin\x27s+blog\x26publishMode\x3dPUBLISH_MODE_HOSTED\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttp://blog.caiwangqin.com/search\x26blogLocale\x3dzh_CN\x26v\x3d2\x26homepageUrl\x3dhttp://blog.caiwangqin.com/\x26vt\x3d3393395200455623441', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Caiwangqin's blog

Focus on Cloud Service, Smart Hardware, Architecture, Technic and beyond…

Ruby/Rails/Mongrel 需要版本匹配

2007年11月2日星期五

请不要随意更新 Ruby 或 mongrel , 在ruby 1.8.5 + mongrel 1.0.4 时会出现以下错误:



NoMemoryError (negative allocation size (or too big)):
/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:86:in `sprintf’




改正方法如下:



yay1# ruby -v
ruby 1.8.6 (2007-09-23 patchlevel 110) [x86_64-linux]
yay1# gem list rails


*** LOCAL GEMS ***


rails (1.2.5, 1.2.2)
Web-application framework with template engine, control-flow layer,
and ORM.
yay1# gem list mongrel


*** LOCAL GEMS ***


mongrel (1.0.4)
A small fast HTTP library and server that runs Rails, Camping, Nitro
and Iowa apps.




注:在 Debian 安装 ruby 1.8.6 (2007-09-23 patchlevel 110) 时,在 Console 下运行 Rails 需要 readline :


sudo apt-get install libncurses5-dev libreadline5-dev
sudo updatedb
slocate ext/ |grep ext/readline
cd ext/readline
sudo ruby extconf.rb
sudo make
sudo make install


标签:

posted by Jesse Cai, 上午3:18

0 Comments:

发表评论

订阅 帖子评论 [Atom]

<< 主页