MDA/MDD/TDD/DDD/DDDDDDD
posts - 536, comments - 111, trackbacks - 0, articles - 0
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

rails记录

Posted on 2008-12-03 02:53 leekiang 阅读(424) 评论(0)  编辑  收藏 所属分类: ruby
1,在以下的文章中找到bort这个rails应用
http://www.railsinside.com/elsewhere/100-7-barebones-rails-apps-to-kick-start-your-development-process.html
  下载bort,放到netbeans6.5中,设置为主项目,启动报错,第一次报capistrano的错误,我在environment.rb中把那几个config.gem屏蔽了。接着又报 `load_missing_constant': uninitialized constant Authorization::AasmRoles::AASM (NameError) ,我照着http://rails_security.lighthouseapp.com/projects/15332/tickets/10-uninitialized-constant-authorization-aasmroles-aasm-nameerror这个链接里的做法
在application.rb的ApplicationController里加了一行require 'aasm',然后就可以启动了。执行ruby db/migrate,重启后,首页能进,但注册一个用户提交后报
Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
这个发生在app/views/users/new.html.erb
暂时就到这里了,以上大多不懂,先作个记录。

2,这是一个基于2.2.2的例子,名叫starter
http://github.com/josevalim/starter/tree/master/app
可以在github里搜2.2.2,或在code search里搜索RAILS_GEM_VERSION = '2.2.2',以寻找基于2.2.2的例子。
http://github.com/brainopia/shop/tree/master
http://github.com/ccjr/play-eoj/tree/master
http://github.com/Radar/rboard/tree/master
http://github.com/rbarazi/simple_blog/tree/master
http://github.com/csiszarattila/webshop/tree/master
http://github.com/bushymark/depot/tree/master

运行starter,却报
  Missing these required gems:
  win32console
  ruby-debug
  ruby-prof

然后
starter>rake gems:install
(in c:/starter)
rake aborted!
no such file to load -- spec/rake/spectask
C: /starter/rakefile:10
(See full trace by running task with --trace)



只有注册用户登录后才能发表评论。


网站导航: