`
chinapkw
  • 浏览: 109113 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

rails2.0 安装beast

阅读更多

今天想安装一下beast看看.毕竟用rails 这么久了.

本来以为很简单的.但还是出错.记录一下,beast 里面写的rails版本为

# RAILS_GEM_VERSION = '1.1.2' unless defined? RAILS_GEM_VERSION

我现在要在2.0上运行.肯定要改很多东西.接下来我们看看都要改哪些可以运行起来,当然

要彻底的运行在2.0上要改的地方很多.慢慢来吧.大家也可以看看升级到2.0里面有哪些改动.

错误:

  1. rake aborted!   
  2. undefined method `template_root=for LoggedExceptionsController:Class   

解决方法.

把plugin exception_logger 删除重装

http://svn.techno-weenie.net/projects/plugins/exception_logger/

这样可以rake db:migrate

错误

但运行还是提示缺少acts_as_list

这是因为2.0移除了以前内置的东西.没关系.装一下这个plugin就可以了

解决

ruby script/plugin install acts_as_list

错误

接下来又出现错误

undefined local variable or method `all_search_posts_path' for #<ActionView::Base:0x2c8899c>

这也是2.0没有了这个方法

解决

把原文件app/views/layouts/application.rhtml   24行

      <% form_tag all_search_posts_path, :method => 'get' do -%>
        <%= text_field_tag :q, params[:q], :size => 15, :id => :search_box %>
      <% end -%>

替换为

      <form action="/posts;search" method="get">   
        <%= text_field_tag :q, params[:q], :size => 15, :id => :search_box %>
      </form>

也就是不用rails help 方法

到此所有的问题都解决了..再刷新一下页面.beast 的页面出现了:)

但是不要高兴的太早,当点击users 又会出现错误了

错误

undefined method `paginate' for #<UsersController:0x499042c>

这很好理解了.rails2.0 去掉了内置的paginate 做为plugin 提供,现在可以看到beast 的首页了.如果要运行在2.0上.要把paginate 修改一下.

  • 描述: beast 首页
  • 大小: 24.5 KB
分享到:
评论
3 楼 chinapkw 2008-06-25  
现在beast有了2.0的版本。可以直接安装了。不用这么费劲了。呵..

== Altered Beast

The popular rails-based Beast forum...

* updated for Rails 2.0
* using rspec/model_stubbing
* added a state machine for user logins
* built-in multi-site support
* spam protection from akismet/viking
* forum authorization rules (public/private/invitation)
* email and atom feed support
* xml/json API
* highline based easy console installer

Help desired via git:

    git clone git://git.caboo.se/altered_beast.git

=== INSTALLATION

    # download altered_beast
    # install rails 2.0.x
    $ mkdir log
    $ rake tmp:create
    $ rake db:schema:load

First created user will be admin.

不过。在改的时侯。可以了解一下。。从 1.2.3 到 2.0改了什么了。如果想直接安装2.0的。可以直接从上面的git 地址安装
2 楼 crystalat 2008-06-19  
装了插件了.MS已经解决了.呵呵.谢谢您的文章
1 楼 crystalat 2008-06-19  
undefined method `paginate' for #<UsersController:0x499042c>

这很好理解了.rails2.0 去掉了内置的paginate 做为plugin 提供,现在可以看到beast 的首页了.如果要运行在2.0上.要把paginate 修改一下.

-------------------------

这个这个.我遇到了这个错误.请问怎么修改啊...希望您能说的详细一些...急死了

相关推荐

Global site tag (gtag.js) - Google Analytics