• #2 楼 @jmsocial 你工作地点具体北京哪里啊

  • 路过,压力好大

  • 我先发一条,看你回复的话在考虑

  • #3 楼 @chanshunli 主要是胸大

  • #9 楼 @flowerwrong 奇怪了

    ➜  activemodel git:(master) ✗ bundle install
    Updating git://github.com/rails/arel.git
    fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository
    Retrying git fetch --force --quiet --tags 'git://github.com/rails/arel.git' "refs/heads/*:refs/heads/*" due to error (2/3): Bundler::Source::Git::GitCommandError Git error: command `git fetch --force --quiet --tags 'git://github.com/rails/arel.git' "refs/heads/*:refs/heads/*"` in directory /Users/ane/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/cache/bundler/git/arel-8151ac946644aab31601d7c0ed944eb9d7ea1e6b has failed.
    If this error persists you could try removing the cache directory '/Users/ane/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/cache/bundler/git/arel-8151ac946644aab31601d7c0ed944eb9d7ea1e6b'
    fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository
    Retrying git fetch --force --quiet --tags 'git://github.com/rails/arel.git' "refs/heads/*:refs/heads/*" due to error (3/3): Bundler::Source::Git::GitCommandError Git error: command `git fetch --force --quiet --tags 'git://github.com/rails/arel.git' "refs/heads/*:refs/heads/*"` in directory /Users/ane/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/cache/bundler/git/arel-8151ac946644aab31601d7c0ed944eb9d7ea1e6b has failed.
    If this error persists you could try removing the cache directory '/Users/ane/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/cache/bundler/git/arel-8151ac946644aab31601d7c0ed944eb9d7ea1e6b'
    fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository
    Git error: command `git fetch --force --quiet --tags 'git://github.com/rails/arel.git'
    "refs/heads/*:refs/heads/*"` in directory
    /Users/ane/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/cache/bundler/git/arel-8151ac946644aab31601d7c0ed944eb9d7ea1e6b
    has failed.
    If this error persists you could try removing the cache directory
    '/Users/ane/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/cache/bundler/git/arel-8151ac946644aab31601d7c0ed944eb9d7ea1e6b'
    
  • #7 楼 @flowerwrong 你的测试没问题?

  • #5 楼 @flowerwrong 好像是这么回事,刚刚也是搜到这结果

  • #3 楼 @flowerwrong 先是

    
    /Users/ane/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/bundler-1.7.6/lib/bundler/source/git/git_proxy.rb:151:in `allowed_in_path': The git source git://github.com/rails/arel.git is not yet checked out. Please run `bundle install` before trying to start your application (Bundler::GitError)
        from /Users/ane/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/bundler-1.7.6/lib/bundler/source/git/git_proxy.rb:47:in `revision'
        from /Users/ane/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/bundler-1.7.6/lib/bundler/source/git.rb:212:in `revision'
    

    然后我就 bundle install

    Updating git://github.com/rails/arel.git
    Fetching git://github.com/rails/sprockets-rails.git
    fatal: ambiguous argument '2-1-stable': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git <command> [<revision>...] -- [<file>...]'
    Git error: command `git rev-parse 2-1-stable` in directory
    /Users/ane/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/cache/bundler/git/sprockets-rails-b90575d71445d74093061ab2de02b6c006ea5b4a
    has failed.
    If this error persists you could try removing the cache directory
    '/Users/ane/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/cache/bundler/git/sprockets-rails-b90575d71445d74093061ab2de02b6c006ea5b4a'
    

    然后我就 mv 这个文件&bundle install

    结果还是

    Updating git://github.com/rails/arel.git
    Fetching git://github.com/rails/sprockets-rails.git
    fatal: ambiguous argument '2-1-stable': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git <command> [<revision>...] -- [<file>...]'
    Git error: command `git rev-parse 2-1-stable` in directory
    /Users/ane/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/cache/bundler/git/sprockets-rails-b90575d71445d74093061ab2de02b6c006ea5b4a
    has failed.
    If this error persists you could try removing the cache directory
    '/Users/ane/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/cache/bundler/git/sprockets-rails-b90575d71445d74093061ab2de02b6c006ea5b4a'
    
  • #1 楼 @flowerwrong 问题就是会报错,估计是环境问题,我看看吧

  • #6 楼 @flowerwrong Module.name

  • #3 楼 @zj0713001 哦,酱紫,还是意识有点差,就觉得是个局部变量

  • 动态定义路由 at 2014年11月19日

    #7 楼 @foxzool 它不是一个固定页面,是一个和系统没有关系的,比如广告插播之类的页面。所以不想每次这样的需求就去写个 MVC。

  • 动态定义路由 at 2014年11月19日

    #8 楼 @steven_yue NO,全都不一样

  • 动态定义路由 at 2014年11月17日

    #2 楼 @_samqiu #1 楼 @flowerwrong 两位这样写,当然是可以滴,可是两位都有一个共同点,就是必须所有的页面都有一个统一的 URL 格式,也就是说可以用一个正则写出来,但我面对的问题确实,URL 是未知的,

  • ruby conf 前,我表正看你的这个帖子,若知道是我面前这位写的。靠,立马问问。。。

  • Homebrew 在 Mac 中如何维护 at 2014年11月05日

    #1 楼 @baocaixiong 我知道是我修改的,可我不知道我什么时候修改了这么多

  • Homebrew 在 Mac 中如何维护 at 2014年11月05日

    #5 楼 @cisolarix 你是 3 个人一块来北京的?

  • Homebrew 在 Mac 中如何维护 at 2014年11月05日

    #4 楼 @y_ding 处女情怀

  • extend main 的作业 at 2014年09月13日

    #1 楼 @hooopo 那这里是相当于 include 到 哪个 class 了?

  • 3 种写法有什么区别 at 2014年09月03日

    #1 楼 @jasl 正如你说的,3 有可能 multi

  • #2 楼 @tiseheaini 没错啊,就是 load 完成才触发 Turbolinks。给你两个方案。第一把你的写到独立的文件中,引入。第二。将 Simditor 的实例化定义到 function 中。.on('ready page:load', 方法名)。这个和直接写回调有个时间 js 的预解析的问题

  • 我觉得是你的 reday 事件,触发了 Turbolinks 的 fresh fetch.你先试试$(document).on('page:load')。另外你确定一下页面的结果是没被解析,还是没有在被需要的的时机被解析

  • 感觉丹尼尔给你的也不是很合适,https://github.com/chloerei/writings。再结合官方文档(google mongoid)

  • 简单的看了看留言,发现楼主看的主要是理论的东西。没基础的你,真能看懂吗?http://railstutorial-china.org 照着书上的,做个 10 遍,直到你没有新的体会为止。不懂就上来问。我就不信,你学不会

  • 我大专 3 年毕业以后,也是不会写程序。知道为什么吗?3 年没怎么学,没有认真,耐心的学

  • #7 楼 @stephen 真如 5 楼的连接里一样,你需要有个状态 pending,accepted,requested。当然你如果是强关系,我觉得,你就干脆“accepted,和 requested”。规则如下。friendship 中加字段 type。a 加 B 好友,直接就是“requested”。B 接受的话,修改为“accepted”。同时插入一条 user_id=B,f_id=A,type="accepted"。这样要找 A 的好友,不就简单了?做个"user_id+type","f_id,type",两个索引

  • select count(user.*) , ( SELECT id, name, (SELECT SUM(money) FROM accounts WHERE (accounts.user_id = users.id) GROUP BY user_id) AS user_money FROM users) as user_account where user.id =user_account.id

  • 而且我没见过使用 select count(id,name...) from table 这样的 sql 这叫什么,汇总 count(id)+count(name)?

  • 你把 user_money 去掉,保证没事。sql 里哪有 count 中放其他 sum 的