`
southwolf
  • 浏览: 4126 次
  • 性别: Icon_minigender_1
  • 来自: 青岛
社区版块
存档分类
最新评论

Beast学习 01 -- 运行环境

阅读更多

Beast 1.0貌似只能在Rails 2.0 底下跑。建议用Ruby186。187跟2.02有点小兼容性问题。

错误信息类似这样:undefined method 'length' for #<Enumerable::Enumerator:0x243a7a4>

 

解决办法: 修改config/environment.rb 重写TextHelper(ActionView)的truncate方法

module ActionView
  module Helpers
    module TextHelper
      def truncate(text, length = 30, truncate_string = "...")
        if text.nil? then return end
        l = length - truncate_string.chars.to_a.size
        (text.chars.to_a.size > length ? text.chars.to_a[0...l].join + truncate_string : text).to_s
      end
    end
  end
end

 

beast说RedCloth插件是可选的…但是不装就出错…  gem install RedCloth -v 3.0.4

 

删除beast 目录下的 \vendor\plugins 中的 exception_logger 重新安装:
 在beast工程根目录下执行

ruby script/plugin install http://svn.techno-weenie.net/projects/plugins/exception_logger/ --force 
 

一切就绪之后rake db:schema:load 加载数据库 启动即可。

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics