Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
小浪鼓
@autumnwolf
VIP
NO. 3780 / 2012-09-26

[email protected]
辽宁大连
33 Topics / 73 Replies
1 Followers
0 Following
2 Favorites
学编程
No GitHub.
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • SSH 不能无密码登录 at October 08, 2014

    最终找到原因~ 权限必须是 755 或者 700,希望能对有的人有用。

  • Rails 4 localhost:3000 这个页面是从哪里来的? at October 05, 2014

    @springwq 噢 知道了 谢谢!

  • Mailer 接收不到邮件 at May 12, 2014

    #5 楼 @dddd1919 嗯 我加了@gmail.com 不过没有重启服务器!重启服务器之后好用了

  • Mailer 接收不到邮件 at May 12, 2014

    #2 楼 @bydmm

    Mailer.contact_email(name, email, body).deliver
    

    已经发送了!

  • Mailer 接收不到邮件 at May 12, 2014

    #1 楼 @dddd1919 就是用的这个。

  • div 如何写成 content_tag at April 24, 2014

    #1 楼 @miclle 谢谢 也尝试这个 不过落下个 do

  • POST 把参数 id 当成 format at April 09, 2014

    #7 楼 @billy 之前以为 has_many,belongs_to 就可以了呢,谢谢

  • POST 把参数 id 当成 format at April 09, 2014

    #5 楼 @miclle 我虽然是创建属于 product 的 line_item,但是我不需要

    /products/line_item/id
    

    这样为什么要嵌套路由呢?

  • POST 把参数 id 当成 format at April 09, 2014

    #3 楼 @miclle button_to 默认就是 post

  • POST 把参数 id 当成 format at April 09, 2014

    #1 楼 @Martin91

     Prefix Verb                 URI Pattern                                     Controller#Action
    line_items GET           /line_items(.:format)                        line_items#index
               POST              /line_items(.:format)                         line_items#create
    new_line_item GET    /line_items/new(.:format)                 line_items#new
    edit_line_item GET     /line_items/:id/edit(.:format)            line_items#edit
    line_item GET             /line_items/:id(.:format)                   line_items#show
    

    Routes 是这样的 我要调用的是 create 方法,POST 那个,应该是 line_items_path 吧?如果是 line_item_path 不就是 show 那个方法了么?

  • Paperclip 在本地上传没有问题,在服务器上出现错误 at March 27, 2014

    #1 楼 @huacnlee 谢谢 刚找到了就是有个缩略图显示,没有上传图片然后添加的时候就会加载一个 missing.png 添加上就好了

  • i18n 国际化问题 at March 22, 2014

    #8 楼 @dddd1919 改了

  • i18n 国际化问题 at March 22, 2014

    #7 楼 @swordray 嗯 但是我首行缩 1 个

    zh-CN:
     activerecord:
       models:
         product: 产品
        attributes:
         product:
           title: 标题
    

    是好用的。用两个会有错误不知道和版本是不是有关。

  • i18n 国际化问题 at March 19, 2014

    还发现个问题是看: “注意 YAML 格式的縮排必須使用兩個空隔,Tab 是不允許的。直接複製貼上可能會有問題,請重新縮排過。” http://ihower.tw/rails3/i18n.html 试了半天都是语法错误,但是缩排是一个空格就好用了。

  • i18n 国际化问题 at March 19, 2014

    #3 楼 @swordray 你说的是 t(:product, :scope => :title ) 这样?

  • i18n 国际化问题 at March 19, 2014

    #2 楼 @hanluner 这个没用双引号也可以,t( ) 现在也好用了

  • i18n 国际化问题 at March 19, 2014

    好吧 静下来沉思了一会,把“title:产品”改成“title: 产品”多了个空格好用了。。。 yml!

  • ActiveModel::ForbiddenAttributesError 该怎么解决? at January 27, 2014

    Rails 4 使用的是 Stong paramaters. 不需要再使用 Attr_accessible 了。 @zfben 这个方法不建议使用。 参考代码

    class ProductsController < ApplicationController
    
      def create
        @product = Product.new(product_params)
    
        if @product.save
          redirect_to @product, notice: 'Product was successfully created.'
        else
          render action: 'new'
        end
      end
    
    
      private
      def product_params
          params.require(:product).permit(:name, .... :category)
        end
    end
    
  • 有多年 c 开发经验并且也懂 c++ 的人,读哪本书能尽快理解 ruby 且上手 ruby 开发? at January 15, 2014

    同在学习中,我觉得怎么也得熟悉下语言,语法这些基本得东西。然后找官网得例子。Agile Web Development with Rails 这个我就没坚持住。

  • [上海] 张江 Startups 诚聘 Rails 大牛 (年薪 20W 起,上不封顶) at January 13, 2014

    微信营销----想知道你们是拿什么做的好或者做的牛呢?拿微信?拿钱么?如果真的把营销搞的很与众不同,为什么推出自己的营销工具或者思路,或者为企业量身定制营销策略呢?

    微信某天死了怎么办呢?不喜勿喷,个人观点。

  • [上海][慢慢下围棋] 招聘不用加班的全职服务器工程师 1 名 (ROR),客户端工程师 1 名 (iOS 和 android) at January 13, 2014

    帮顶啊,可惜去不了啊

  • Could not find multi_json-1.8.4 in any of the sources at January 13, 2014

    @chareice #2 楼 @Martin91 解决了 问题是在本地通过 cap 这样调用的貌似是服务器自带的 ruby 1.9.2;然后在服务器端就调用 rvm 安装的 2.0 版本的 ruby; 用 rvm-capistrano 就可以让 cap 选择 rvm 的 ruby 了。 谢啦!

  • Could not find multi_json-1.8.4 in any of the sources at January 13, 2014

    #1 楼 @chareice 试过了 不好用

  • Active_admin 从 0.4.3 升级到 0.6.2,点击 Modle 就出现下面的错误 at January 12, 2014

    升级了 formtastic,搞定了

  • Assets production 下 403 forbidden at January 06, 2014

    #3 楼 @search 谢谢,之前是用 nginx 这个用了,改成 william 之后好用了!

  • Assets production 下 403 forbidden at January 06, 2014

    #4 楼 @_samqiu 是的 嗯 欲编译了,里面主要是 application.js / .css 和一些图片,截图 #3 楼,改用户之后好用了,同样感谢!

  • Assets production 下 403 forbidden at January 06, 2014

    #1 楼 @_samqiu 编辑,贴上了 nginx 配置。

  • Capistrano 部署网站错误 at November 07, 2013

    #14 楼 @smallX 是啊 折腾了这两天也算是入门了

  • Capistrano 部署网站错误 at November 07, 2013

    这个关了吧。nginx 里面改成运行网站的用户就解决了问题。只是想说这个好耗费时间。

  • Capistrano 部署网站错误 at November 07, 2013

    仍旧挣扎中,目前的情况是放在 root 用户下可以访问首页,只是没有样式,nginx 的日志:

    2013/11/07 05:30:49 [error] 23376#0: *58 open() "/home/root/apps/clinic/current/public/assets/application.js.gz" failed (13: Permission denied), client: 124.93.197.4, server: domain.com, request: "GET /assets/application.js HTTP/1.1", host: "domain.com", referrer: "http://domain.com/"
    2013/11/07 05:30:49 [error] 23376#0: *58 open() "/home/root/apps/clinic/current/public/assets/application.js" failed (13: Permission denied), client: 124.93.197.4, server: domain.com, request: "GET /assets/application.js HTTP/1.1", host: "domain.com", referrer: "http://domaincom/"
    
  • Prev
  • 1
  • 2
  • 3
  • Next
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English