群不就是扯淡交朋友的地方么。。加一两个挺好,用 qq 群和学不学没啥太大关系
@smallbug 啊。。。
@smallbug 冰姐姐~
@smallbug 冰姐姐你和虫姐用一个号噻?
唱歌靠谱。。。。
@D90 其实 rails 的开发是不需要 nginx+unicorn 的 你在 rails s 时会使用自带的 webrick 或者 thin 完全可以满足需要,用 passenger 或者 unicorn 反而会降低开发效率 另,开发环境 puma 也是一个很好的选择
https://github.com/mattias-ohlsson/gitlab-installer/blob/master/gitlab-install-el6.sh 你可以研究一下这个 不过还是推荐 nginx+unicorn 的方案,更灵活一些
@starryin 从我这帝都二本学校的观察,99% 达不到这个要求 另:兄弟在理工大,有自己的业余爱好、课外生活(写小说、社团活动),同时保证基本功扎实(自己独立写操作系统解释器什么的都是大作业,期末考 80+),再培养成这样的全栈式开发者,几乎登天。 大学还是打好基础是一条路,锻炼成全栈式开发者算另一条路吧,走前者的,一年经验不能要求太多
不知道你是怎么选择的
我来组成火把!
不需要这么复杂吧。。。利用 query chain 加一条 limit 的限定就好了呗
@posts = Post.limit(100).page params[:page]
我想过的一个 at 的思路(没看过同类的)是:
试用 ajax...
@starryin 一年经验就 15k 了我去。。。。太不科学了
5.x 6.x 用 rvm 很顺利 注意添加 rpmforge 和 epel 源
@xdite 重写了,thx
@Rei thx
@Rei 我曾经的实现是直接往 output_buffer 里写,这样呢? 如果要是这样不合适的话,那就采用 partial view 的方式了,要不 html 会比较乱
@Rei 我是因为还有一些计算呵呵,放 helper 里理论性能高点
很简单了。。一个 helper 的例子,代码有点乱
def output_cities()
p = request.query_parameters.to_hash
p.delete "city"
html = "<li>"+link_to("全部", providers_path(p), :class => "icon-all #{"cur" if params[:city].blank?}")+"</li>"
CITIES.each do |k, v|
html<< "<li>"+link_to(v[0], providers_path(p.merge("city" => k)), :class => "#{v[1]} #{"cur" if params[:city] == k}")+"</li>"
end
html.html_safe
end
推荐百度的 ueditor 生成的 html 简洁,而且符合中国人的操作习惯,提供的表情等功能也很好,官网可以先定制再下载的。缺点的话是文档太烂,配置文件的注释比较混乱。
kindeditor 曾经用,优点类似 ueditor,但是生成的 html 很脏,甚至有""=""这种情况,现在我已经把自己产品里的 kindeditor 都替换到了 ueditor ckeditor 功能很强,但操作比较复杂,很重,但是那个 gem 做的很完善 另外国外的 tinymce 也很强大,应该是最强大的了吧。。
wysihtml5 推荐,但是他生成的 html 没有 p 标签(可能是我配置的问题),另外因为是 html5 的所以。。。不过还是值得推荐,小巧,强大,容易定制
@xhj6 可能吧,回头看一眼,不过我有 monit 内存超过一定阀值自动去重启
rails_kindeditor 的附件部分做的不好,不喜欢 另外放弃 form_helper 不是明智的选择,我修改了那个 gem 的 helper https://github.com/jasl/start_up/blob/master/lib/form_helpers/kindeditor.rb 同时在页面需要引入https://github.com/jasl/start_up/blob/master/app/assets/javascripts/kindeditor.js.coffee
<%- @comment ||= @post.comments.build -%>
<%= form_for([@comment.commentable, @comment]) do |f| -%>
<fieldset>
<legend>Comment post</legend>
<div class="row row-grid">
<div class="span8 offset2">
<%= print_error_messages @comment -%>
</div>
</div>
<div class="control-group">
<%= f.label :body, :class => 'control-label' -%>
<div class="controls">
<%= f.kindeditor :body, :height => 100, :items => %w(fontname fontsize | emoticons image link) %>
</div>
</div>
<div class="form-actions" >
<%= f.submit :class => 'btn btn-primary' -%>
</div>
</fieldset>
<% end %>
给你一个参考的 unicorn 配置文件,你给的信息很少,所以只能说 配置有问题。。至于 nginx 报上游服务器超时,是因为 unicorn 启动失败导致的 https://github.com/jasl/start_up/blob/master/config/unicorn/production.rb 另,内存泄露一直是 ruby 的老毛病,所以 unicorn 默认是 30s 重启一次 worker
所以,我觉得是两个完全不同的设计思路,各有优劣,看情况去使用就好,carrierwave 因为有 uploader 类,所以我可以在这个层面对一些内部的东西做 hack,效果也还可以
::是命名空间的分隔符啊 前面不加东西 则代表顶层的命名空间咯
linode 512 内存 centos 6.3+nginx+mysql+ruby 1.9.3+unicorn 方案,拖 redmine+gitlab+testing branch 完全无问题
Ruby uses the C stack so your options include using ulimit or compiling Ruby with some compiler/linker stack size flag. Tail recursion is yet to be implemented and Ruby's current support for recursion isn't so great. As cool and elegant recursion is, you might want to consider coping with the language's limitations and writing your code in a different way.
@iBachue 个人介绍更新的真快。。。。