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 加载数据库 启动即可。

 

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值