rails2.0 安装beast
关键字: beast今天想安装一下beast看看.毕竟用rails 这么久了.
本来以为很简单的.但还是出错.记录一下,beast 里面写的rails版本为
# RAILS_GEM_VERSION = '1.1.2' unless defined? RAILS_GEM_VERSION
我现在要在2.0上运行.肯定要改很多东西.接下来我们看看都要改哪些可以运行起来,当然
要彻底的运行在2.0上要改的地方很多.慢慢来吧.大家也可以看看升级到2.0里面有哪些改动.
错误:
- rake aborted!
- 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 修改一下.
评论
== 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 地址安装
这很好理解了.rails2.0 去掉了内置的paginate 做为plugin 提供,现在可以看到beast 的首页了.如果要运行在2.0上.要把paginate 修改一下.
-------------------------
这个这个.我遇到了这个错误.请问怎么修改啊...希望您能说的详细一些...急死了
发表评论
- 浏览: 20679 次
- 性别:

- 来自: 北京

- 详细资料
搜索本博客
我的相册
共 5 张
链接
最新评论
-
ramgick 剪切用户头像
这个用的是Prototype,有时切图时CPU占用率较高,比较慢,不知道有么有j ...
-- by lgn21st -
ramgick 剪切用户头像
难道我的权限还不够,不能上传附件,晕掉。。 你在网上找一下CropperUI- ...
-- by chinapkw -
ramgick 剪切用户头像
加问一句,那个view需要些什么代码?谢谢!
-- by qianjigui -
e-texteditor 与cygwin ...
chinapkw 写道 用netbeans 开发rails 有一年时间了。 ...
-- by yautah -
e-texteditor 与cygwin ...
这里要注意一点.就是e-text 默认的 从controller 跳到 .rh ...
-- by chinapkw






评论排行榜