Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
mojidong
@mojidong
VIP
NO. 2887 / 2012-07-16

杭州
7 Topics / 132 Replies
0 Followers
0 Following
2 Favorites
在拖延剁手啊~~~~
No GitHub.
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 辞职了,是要创业呢?还是创业呢? at May 29, 2013

    @badboy 继续创业吧,显然楼主已经从这次失败的经历中学习到了很多,继续吧,有些东西是需要坚持的

  • attr_accessor 定义的类变量如何在实例方法中访问??? at May 29, 2013

    补下基础知识吧

  • 如何解决数据库挂掉,其他不依赖数据库的功能依然可用? at May 17, 2013

    @Victor 从搜索引擎,这个和数据库没关系

  • 如何解决数据库挂掉,其他不依赖数据库的功能依然可用? at May 17, 2013

    查资料没有发现能通过配置解决。。。难道要 hack

  • 最近一段时间的招聘贴质量都不高呀 at May 16, 2013

    @chairy11 从生物学角度来说,大胸的妹子更容易繁殖后代,存活率更高(以前是没有奶粉的),经过漫长岁月,这已经深深的写入了我们的基因

  • 有多少人是这个状态的? at May 12, 2013

    愧对妻子吧,还是个大肚子,没有更多时间陪她。

  • 奔溃了 git commit 之后没有 merge,然后.git/ 文件夹被我删除了。 at May 10, 2013

    立马停止任何 io 操作,然后用相应工具恢复,这个要看运气,如果文件数据块被覆盖就彻底无力了

  • 多个 checkbox 同时提交 at May 10, 2013

    view

    <% @tags.each do |tag| %>
       <%= check_box_tag 'tags[]',tag.id %> <%= tag.name %>
    <% end %>
    

    controller

    tags=params[:tags]
    
  • 有人告诉我如果数据量大了就不能做分页了?是这样么? at May 09, 2013

    @luikore mongodb 用的比较早,现在没怎么用了。 自己做灵活可控,用其他自带方案第一个是不一定能满足需求,第二个就是出现 bug 是我们不能够承受的,不可能等到他下一个版本 fix。最终还是要自己写中间件。

  • 有人告诉我如果数据量大了就不能做分页了?是这样么? at May 09, 2013

    @luikore mongo db 在实际应用中有丢数据现象,在则我是不敢把交易数据放在里面,mongo 不是银弹,不要过分神话。手动分库分表的好处在于,可以灵活的迁移数据,可以有效控制数据库压力,将冷数据放入配置一般的数据库集群上,热数据放在配置较高的集群上,我相信 mongo 没法满足我这个需求

  • 有人告诉我如果数据量大了就不能做分页了?是这样么? at May 09, 2013

    @luikore 自带的是不可能满足所有业务需求的,包括扩容,迁移等。

  • 有人告诉我如果数据量大了就不能做分页了?是这样么? at May 09, 2013

    数据量非常大就需要考虑分库分表,将大数据集拆分为小数据集,这样可以保证查询效率,一般会选择根据用户 id 分表分库,让同一个用户的的数据落在同一个库中

  • 怎样发出带 xml 格式 body 的 post 请求 at May 08, 2013

    @jiang_plus 没成功是什么意思,我这里是可以的。 你可以用 fiddler 抓包看看

  • 怎样发出带 xml 格式 body 的 post 请求 at May 08, 2013

    @jiang_plus 是的,如果有问题的话后面在加上 :content_type =>:xml

    RestClient.post '/data','<xx><tt>tt</tt></xx>',:content_type =>:xml
    
  • 怎样发出带 xml 格式 body 的 post 请求 at May 08, 2013

    @jiang_plus RestClient.post '/data','<xx><tt>tt</tt></xx>'

  • rvm 安装问题 at May 08, 2013

    @jiyinyiyong https://rvm.io/rvm/install/

    Multi-User:
    
    The rvm function will be automatically configured for every user on the system if you install with sudo. This is accomplished by loading /etc/profile.d/rvm.sh on login. Most Linux distributions default to parsing /etc/profile which contains the logic to load all files residing in the /etc/profile.d/ directory. Once you have added the users you want to be able to use RVM to the rvm grou p, those users MUST log out and back in to gain rvm group membership because group memberships are only evaluated by the operating system at initial login time. Zsh not always sources /etc/profile so you might need to add this in /etc/**/zprofile:
    
    source /etc/profile
    
  • rvm 安装问题 at May 08, 2013

    @open 你应该是之前安装了一个多用户的 rvm 两个选择

    1. 使用这个全局的 rvm
    2. 删除这个全局的,然后在装单用户的 rvm
  • rvm 安装问题 at May 08, 2013

    @open 先切换到普通用户,然后在按 wiki:http://ruby-china.org/wiki/rvm-guide,里的步骤来做。

  • rvm 安装问题 at May 08, 2013

    @open 你是用 root 切换到普通用户安装的吧,切换是不是没有使用正确的命令,要用su - open

  • rvm 安装问题 at May 08, 2013

    @open 你用的哪个用户装的 rvm,确定是用 root 安装的

  • 想了解下现在的 rails 主机大都什么版本?最新的什么版本? at May 08, 2013

    直接 vps,好处大家都懂

  • Web 服务器是多用户好,还是单用户好? at May 03, 2013

    @ery 同一个类型服务用同一个账号,比如 web server 用同一个账号,db server 一个账号,task server 一个账号,前期小规模没必要搞太复杂,把精力分散在这上面不值得。

  • production 模式下怎样才能连接到 /public 下的文件? at May 03, 2013

    @richard020389 你这个八成是权限问题

  • production 模式下怎样才能连接到 /public 下的文件? at May 03, 2013

    @richard020389 看看你的 nginx error log

  • production 模式下怎样才能连接到 /public 下的文件? at May 03, 2013

    @richard020389 贴下你的 nginx 配置

  • production 模式下怎样才能连接到 /public 下的文件? at May 03, 2013

    config.serve_static_assets这个只是开启 rails 自身 server 处理静态文件的能力,一般来说静态文件都会交给 nginx 或 apache 等一些 http server 处理,这样做的好处是提高性能,让 rails server 只处理动态请求,不必浪费资源处理静态文件请求。在则 rails server 处理静态文件的性能完全不能和 nginx,apache 之类的比。

    location ~* /.*\.(png|jpg|ico|css|js) {
     expires max;
     root /home/user/apps/current/public;
    }
    
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English