Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
Eric-Guo
@ericguo
高级会员
第 1665 位会员 / 2012-03-31

[email protected]
天华建筑设计
上海
47 篇帖子 / 1390 条回帖
181 关注者
245 正在关注
75 收藏
Codex PR & commit submitter, specialist on Rails and React.
GitHub Public Repos
  • wechat 1332

    API, command and message handling for WeChat in Rails

  • wechat-starter 351

    WeChat web app with wx_pay in rails

  • tailwindcss-jit-stimulus 19

    A template with Rails 7.1, Shakapacker 7.2, TailwindCSS 3 and Stimulus 3.0

  • pgac_demo 15

    Rails 7.2 Action Cable chat room using AnyCable as backend

  • coreui4-rails-starter 12

    The CoreUI 4 Rails starter

  • product_hunt 5

    Demonstrate new Rails 5.1 feature: Assets on Yarn, System tests with Capybara and unified form_wi...

  • sublime-user-folder 5

    My Sublime Text 4 user folder content

  • openproject 3

    OpenProject is the leading open source project management software.

  • openproject-proto_plugin 1

    Exemplary OpenProject plugin demonstrating different ways to extend OpenProject.

  • homeland 1

    :circus_tent: An open source forum/community system based on Rails, developed based on Ruby China.

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • cap 部署时,releases 中生成的目录名是时间戳,但是不是东八区,而是 0 时区 at 2014年04月20日

    #1 楼 @Rei 看了一下:

    env.rb 取了 timestamp

    def release_timestamp
        env.timestamp.strftime("%Y%m%d%H%M%S")
    end
    

    configuration.rb 生成的时候的确是 UTC

    def timestamp
        @timestamp ||= Time.now.utc
    end
    

    所以将本机的 configuration.rb 文件里面 80 行.utc 删掉就是本地时间了(也许我应该考虑给他们提个 pull request?) :😄:

  • 部署完成后访问 403 Forbidden at 2014年04月20日

    #8 楼 @xautjzd 我在 512MB 机器上 Ubuntu 12.04 肯定是有成功经验的,然后有人在 CentOS 6.4 上也是成功搞出 Passenger 4 的,至于你,还是自行选择放弃不放弃 CentOS 吧。。。:😄:

  • 部署完成后访问 403 Forbidden at 2014年04月20日

    先等等切,再试一下加一下虚拟内存试一把:

    sudo dd if=/dev/zero of=/swap bs=1M count=1024
    sudo mkswap /swap
    sudo swapon /swap
    
  • 部署完成后访问 403 Forbidden at 2014年04月20日

    总算找到了CentOS的了:

    The RPMs are currently unmaintained. As such, the repository only contains Phusion Passenger 3.x (the latest version is 4.x), which did not support Node.js, Meteor, multiple Rubies, etc. For more recent versions of Phusion Passenger, you are suggested to install from gem or tarball instead.

    也就是说,如果你用 3.x,不要配 rvm,也最好不要用 ruby 2.0,或者还是老老实实从 gem/tarball 编译。

  • 部署完成后访问 403 Forbidden at 2014年04月20日

    我觉得你还下定决心换 Ubuntu 算了,查了下官网,passenger 也没 centos 的资料,当然如果你是编译达人或者有能力从 source code build 整套 web stack,其实用啥系统真的无所谓,不过明显你也是苦手。。。

  • 部署完成后访问 403 Forbidden at 2014年04月20日

    passenger 3.0.12 出来的时候,ruby 可能 1.9.3 都还没出,而你还要求 passenger 3 的版本支持 ruby 2.0。。。你这个问题看起来是权限问题,不过我觉得就算 passenger 作者来了,也没法给你解,只会让你用新版本啊!

  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at 2014年04月20日

    #28 楼 @xautjzd 没事不要改默认配置,除非你确信你在干嘛。。还有你要先删除 CentOS 的 passenger 再装。

  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at 2014年04月20日

    #26 楼 @xautjzd 如果编译安装 passenger,配置文件默认在/opt/nginx/conf/,你看到的配置文件都是之前的。。

  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at 2014年04月20日

    #24 楼 @xautjzd 看起来你快爬出坑了,现在就缺解决权限问题了,无论如何,欢迎来到 Ruby 的世界。。

  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at 2014年04月20日

    #15 楼 @xautjzd 其实目前 rails 最佳部署环境是 Ubuntu 12.04 LTS。。。

  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at 2014年04月20日

    #16 楼 @xautjzd passenger?不是一找一大把么?。。

    In Phusion Passenger 4, using SetEnv and PassEnv in Apache and env in Nginx works as expected. Detailed information can be found in the Phusion Passenger manual, section “About environment variables”.

    http://blog.phusion.nl/2008/12/16/passing-environment-variables-to-ruby-from-phusion-passenger/

  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at 2014年04月20日

    #15 楼 @xautjzd sudo su -成为 root 先。。。

  • Rails AES 加密后用 php 解密不了 at 2014年04月20日

    #1 楼 @night_song 赞!这个解答我要记下来!

  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at 2014年04月20日

    #9 楼 @xautjzd 先删掉 ngingx-passenger,然后通过gem install passenger && passenger-install-nginx-module 安装 passenger,然后再做文档的步骤。

  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at 2014年04月20日

    这是同一台机器么。。。啥操作系统?Ubuntu 照理不会发生这样的情况啊。。

  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at 2014年04月20日

    #4 楼 @xautjzd 可是明明是 1.8 的目录。。

    5   /usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/utils.rb     326     in `prepare_app_process'
    
  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at 2014年04月20日

    访问了你的主页,你的 ruby 版本太低,升到 ruby 2.0.0 p 451 应该就可以解决问题,另外 passenger 的版本也太低,现在早已是 4.0.41 版本啦!

  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at 2014年04月20日

    一般不需要用 therubyracer,除非你用 less,默认不需要就是为啥注释掉的原因,你可以装一个node.js 作为 javascript 运行时环境。

  • 快速搭建 Gitosis 服务器望指点.? at 2014年04月19日

    二楼正解,gitosis 被 gitolite 代替了,gitolite 被 gitlab 代替的,所以新建服务还是直接 gitlab 吧。

  • Simple Form 终完美支持 Bootstrap 3 at 2014年04月19日

    simple_form 虽然叫 simple_form,实际上一点都不 simple,太多要记的用法,所以我用了一段时间后还是回归 rails 自带的 helper 了。。

  • 关于使用 net-ssh gem 将文件上传问题 at 2014年04月19日

    要不绕一下?用 bash 和 scp 命令算了?前面是坑我们除了跳,还可以绕。。

    #/bin/bash
    bzip2 -kf ../server/db/time_inout.sqlite3
    scp -i ~/.ssh/server_id_rsa ../server/db/time_inout.sqlite3.bz2 user@hostname:server/db/time_inout.sqlite3.bz2
    ssh -i ~/.ssh/server_id_rsa user@hostname 'bunzip2 -f ~/server/db/time_inout.sqlite3.bz2'
    
  • 想在毕 at 2014年04月15日

    做的很不错啦!比我当年强多了。

  • [上海][2014年4月15日] 四月周中聚会 at 2014年04月15日

    四十二楼被占了。。。

  • RJS 有什么明显的危害么? at 2014年04月13日

    好像升级到 4.1,get 返回 RJS 也是安全的了:

    class ApplicationController < ActionController::Base
      # Prevent CSRF attacks by raising an exception.
      # For APIs, you may want to use :null_session instead.
      protect_from_forgery with: :exception
    end
    

    For Rails 4.1: https://github.com/rails/rails/pull/13345

    Since we don't know the response format until rendering, it's simplest to use an after_action to verify that we aren't serving JS to a non-XHR GET request.

    This piggybacks on the same protect_from_forgery declarations that apps already use, so they'll transparently get protection without changing anything.

    Apps that intentionally expose JavaScript responses (like third-party widgets, per-customer API embeds, etc) will need to exclude those actions using existing protect_from_forgery API.

    Thanks everyone for the (long) discussion and thanks to Egor for the initial report - months ago now! - and this reminder.

  • RJS 有什么明显的危害么? at 2014年04月13日

    讨论好长。。。 反正我经常用,好像不要用在 get 的时候返回 RJS 就好了?

  • Virtus vs ActiveModel 应该选哪个? at 2014年04月13日

    #1 楼 @leekelby 那就要用active_attr?

  • 请推荐个适合 rails 的 Admin Template at 2014年04月13日

    买来的 CSS 和 JS 是压缩?那就意味着无需修改只要写 HTML 啊,因为压缩的就是不让你改啊!

  • Github 登录不上去了啊?,挂代理也出现错误. at 2014年04月12日

    试了,可以,开了 2 step verify,没有用代理。

  • Rails 4.1.0 正式发布了…… at 2014年04月09日

    刚升级,发现rake test:all下面的 controller test 会测试 render 出来的 HTML 标记的是否闭合了!

  • 什么时候使用 Concerns,什么时候使用 Services? at 2014年04月05日

    推荐这篇:7 Patterns to Refactor Fat ActiveRecord Models 中文版

  • 上一页
  • 1
  • 2
  • …
  • 26
  • 27
  • 28
  • 29
  • 30
  • …
  • 44
  • 45
  • 下一页
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English