mkmf 是因为 ruby 里面负责编译 c 扩展的模块没装上,其实本来 ruby 都有的,不过 ubuntu 把 ruby 拆了几个包。
搜了一下,你装的 ruby 1.9,应该是 sudo apt-get install ruby1.9.1-dev
http://stackoverflow.com/questions/7645918/require-no-such-file-to-load-mkmf-loaderror
推荐用 rvm 安装 ruby,ubuntu 的 rubygems 锁了版本号,以后也会遇到问题。
sudo apt-get install ruby-dev
The advantages of Git compared to other source control systems.
这话题太无聊了,估计要叫 iGit 就万事大吉了。
Git Source Code Mirror - This is a publish-only repository and all pull requests are ignored. Please follow Documentation/SubmittingPatches procedure for any of your improvements.
建议用 jBuilder
#2 楼 @1272729223 可喜可贺
以后部署除了选择 server 外,还要选择运行模式,更多可玩的了~
要实现更丰富的应用体验,这个特性是必需的了。live streaming 可以减少对其他并发工具的依赖。
Why Rails 4 Live Streaming is a big deal
http://blog.phusion.nl/2012/08/03/why-rails-4-live-streaming-is-a-big-deal/
加个模型校验,做提交前的客户端校验比较方便。
如果用 Redis 缓存,可以用 Hash 类型储存,实现批量过期。印象中 redis_store 只用了 key-value,所以得自己写逻辑。
看来 @bhuztez 完全没了解过 Rails 就来推广 Django。
会部署应用、数据库、其他工具,跑定时任务,备份,权限管理
Phusion Passenger design & architecture
http://www.modrails.com/documentation/Architectural%20overview.html
Deploying Rails: Automate, Deploy, Scale, Maintain, and Sleep at Night http://pragprog.com/book/cbdepra/deploying-rails
<%= link_to File.basename(f.redocument.url), "/uploads/#{f.id}/#{File.basename(f.redocument.url)}" %>
这里就可以推出,如果想直接显示图片
<%= image_tag "/uploads/#{f.id}/#{File.basename(f.redocument.url)}" %>
当然,这个地址的生成应该写成一个 model 方法。
superclass 不就是 class 的爸爸吗?