Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
Levan小黑
@levan
VIP
NO. 744 / 2012-01-12

深圳
106 Topics / 581 Replies
10 Followers
0 Following
320 Favorites
还有4年。
No GitHub.
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • Rails 开发环境, Puma 跑,不停刷新,结果页面卡死了。。。 at May 30, 2013

    另外想请教一下,puma 官网的这个测试图,对不懂深度配置的新手来说,有意义吗?

  • zsh: exec format error: git 请问该怎么解决?[重装系统了。。。结贴] at May 29, 2013

    @luikore 直接把整个系统回滚到刚开始装好 ruby 和 rails 的状态了。。。。google 了一个多小时,stackflow 也木有。。。 幸好有个备份。。。 谢啦~

  • zsh: exec format error: git 请问该怎么解决?[重装系统了。。。结贴] at May 29, 2013

    @blacktulip 这个错误无从下手了。我用快照回滚了。谢谢~

  • zsh: exec format error: git 请问该怎么解决?[重装系统了。。。结贴] at May 29, 2013

    @blacktulip Passenger/Nginx/Ubuntu快速部署Rails 3.1 如何快速正确的安装 Ruby, Rails 运行环境

    应该不是教材的问题,我按照这个装过一次,没有问题,这次不知道又出了什么事,能想起来的唯一的差别,就是这次装好了之后,就直接安装 zsh 和 oh-my-zsh 了

    主要是,搜关键字,连 google 都出不来。。。。这让人郁闷,难道又要重装了吗?

  • zsh: exec format error: git 请问该怎么解决?[重装系统了。。。结贴] at May 29, 2013

    @blacktulip 服务器之前出了点问题,然后就重置了,按照社区的教程安装的

  • 又是关注又是喜欢又是收藏? at May 28, 2013

    @hooopo I can't agree more ~~~~~

  • 骚年,讲个故事吧 at May 27, 2013

    做这种以内容为主的,最累的不是完成网站,而是推广。没心做下去的就是死路一条了。 楼主加油。。。 另:你不如先自己般内容,各种网易神贴不是很多么,自己上百个虚拟社区的繁荣,然后通过微博宣传吧。这真是件累人的事。

  • 关于 rails Views at May 25, 2013

    推荐用 有道 划詞翻译。另外它有个 chrome 翻译的插件,叫网页智能翻译

  • 第三版中文还是第四版英文 at May 16, 2013

    4,借助翻译软件看电子版,后面还有大把的英文资料需要看。

  • 再统计个有多少在校生? at May 16, 2013

    另…同挂 n 门…这学期不挂科应该不用上大五…飙泪…

  • 再统计个有多少在校生? at May 16, 2013

    在校…深大…顺便找校友交流…

  • [做个试验] Rails 学习指导服务——指导你更有效率的学习 Rails 开发 [已暂停] at May 15, 2013

    简单的假设,能去你那学 Rails 的人,全国就一百人,分三个阶段的视频,分开收费,全套一千五左右; 然后还可以做项目视频,各种项目的开发建设过程,类似 Rails Tutorial,每个单独收费; 而且,这个市场不能只看这个时间段学 Rails 的人,你的视频好,降低了 Rails 学习门槛,向外推荐的人多,再搞个类似会员推荐系统,推荐者拿回扣。 不过也要看你的口才,讲解思路怎么样。 如果你的平台可以做的起来,其他人也可以录制视频,放你平台,你收成。 你帮人做项目是项目费,还有之后的维护费;做教学平台,可能一直收下去。就像 RailsCasts 一样。 以上,只是假想的一个项目而已。全部建立在学习成本性价比上。

  • 登入进来后,界面看起来有点奇怪 at May 15, 2013

    @eva 查看 ruby-taiwan 的 github 你就知道了

  • [做个试验] Rails 学习指导服务——指导你更有效率的学习 Rails 开发 [已暂停] at May 15, 2013

    @mistbow daqing 是怕辛辛苦苦录的视频被人轻松下载

  • 招募 Ruby 或 Python 开发者成為 CTO 或合作伙伴! at May 12, 2013

    @lgn21st hahahaha

  • 想问一下有什么类似 Mention 功能的 Gem 吗? at May 10, 2013

    Ruby-taiwan 的 notification 功能还不是很能看懂。。。

  • Bootstrap 中文網 at May 08, 2013

    @chairy11 当然不可能是官方的,是国内的一些组织弄的吧。

  • 请问如何将 Rails 的表单提交按钮跟 Bootstrap Modal 的提交按钮连接起来? at May 08, 2013

    @miclle 搞定,谢谢!

  • 庆祝星战节,Code School 30% 优惠码 at May 05, 2013

    算了。。。。算是我错了。。。看了记录,发现已经自动续费过一次了。。。哭去。。。

  • 庆祝星战节,Code School 30% 优惠码 at May 05, 2013

    我只是奇怪我的 codeschool 通过 visa 付费的,貌似只收过我一次费用,可是现在已经一个多月了,还一直没有限制我,而且也没有提示付费。。。

  • 照片展示,Rails 内无故生成一张无内容照片 at May 05, 2013

    @Rei 嗯。。。懂了,参照<Rails 3 in Action>,用 merge! 代替原来的一堆代码,然后多手把@photo = Photo.new改为了@photo = @album.photos.build.

    现在已经恢复正常了,感谢! :)

  • 照片展示,Rails 内无故生成一张无内容照片 at May 05, 2013

    @Rei

    #encoding: utf-8
    class AlbumsController < ApplicationController
        before_filter :authenticate_user!, :except => [:index, :show]
        before_filter :get_user
        layout 'album'
    
        def index
            @albums = @user.albums
        end
    
        def new
            @album = @user.albums.new
        end
    
        def create
            @album = @user.albums.build(params[:album].merge!(:user => current_user))
    
            if @album.save
                redirect_to user_albums_path(@user),notice: "相册创建成功" 
            else
                render :new, notice:"相册创建失败"
            end
        end
    
        def show
            @album = @user.albums.find(params[:id])
            @photos = @album.photos
            @photo = @album.photos.build
        end
    
        def destroy
            @album = current_user.albums.find(params[:id])
            @album.destroy
            redirect_to user_albums_path(@user), notice:"已成功删除#{@album.name}相册!"
        end
    
        def edit
            @album = @user.albums.find(params[:id])
        end
    
        def update
            @album = @user.albums.find(params[:id])
            if @album.update_attributes(params[:album])
                redirect_to user_albums_path(@user)
            else
                render action: "edit"
            end
        end
    
        private
    
        def get_user
            @user = User.find(params[:user_id])
        end
    end
    
  • 照片展示,Rails 内无故生成一张无内容照片 at May 05, 2013

    @Rei 哦,等等

  • 照片展示,Rails 内无故生成一张无内容照片 at May 05, 2013

    @Rei

    def show
        @album = @user.albums.find(params[:id])
        @photos = @album.photos
        @photo = @album.photos.build
    end
    
  • 照片展示,Rails 内无故生成一张无内容照片 at May 05, 2013

    photos_controller.rb

    def create
      @photo = @album.photos.build(params[:photo].merge!(:user => current_user))
    
      if @photo.save
        redirect_to [@album.user, @album], notice: 'Photo was successfully created.'
      else
        render :new
      end
    end
    

    albums/show.html.haml

    %ul
        - @photos.each do |photo|
            %li.aphotos
                = image_tag(photo.image_url) if photo.image.present?
    
    = link_to 'new photo',new_album_photo_path(@album)
    

    @Rei

  • 照片展示,Rails 内无故生成一张无内容照片 at May 05, 2013

    @Rei 你好,这个是 debug 的结果(我不会用 debug,只知道可以显示一些对象的内容) 这个是我上传一张图片之后的样子,在没有上传图片的时候,就已经有了限免俺哥 attributes 的内容。 也就是你所说的那个占位符的内容。

    - !ruby/object:Photo
                       attributes:
                         id: 1
                         user_id: 1
                         album_id: 1
                         name: ''
                         desctiption: 
                         comments_count: 
                         image: 2.jpg
                         created_at: 2013-05-04 16:51:45.000000000 Z
                         updated_at: 2013-05-04 16:51:45.000000000 Z
                     - !ruby/object:Photo
                       attributes:
                         id: 
                         user_id: 
                         album_id: 1
                         name: 
                         desctiption: 
                         comments_count: 
                         image: 
                         created_at: 
                         updated_at: 
    
  • 照片展示,Rails 内无故生成一张无内容照片 at May 05, 2013

    @Rei 请问怎样才能消除那个呢?就是我在创建 album 的之后,查看新建的 album 就发现里面有这个了。并不知道他是怎么来的。

  • 照片展示,Rails 内无故生成一张无内容照片 at May 04, 2013

    @kevinhua 看到 stackfolow 里的讨论大概懂你的意思了,貌似有点深度。。。 @Rei 加多了一个判断

    %li.aphotos
        = image_tag(photo.image_url) if photo.image.present?
    

    不会显示那张失效的图片了。不过还是没从根本上解决,我再看看。 谢谢

  • HHKB 包包 at May 04, 2013

    这……何必……

  • Textmate 2 现在比较好用了,但是还不能用 emmet at May 04, 2013

    @hilbert 弹窗有办法搞定 自己搜吧

  • Prev
  • 1
  • 2
  • …
  • 7
  • 8
  • 9
  • 10
  • 11
  • …
  • 18
  • 19
  • Next
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English