Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
@444137051
会员
第 30230 位会员 / 2017-01-20

0 篇帖子 / 4 条回帖
0 关注者
0 正在关注
0 收藏
GitHub Public Repos
More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • Rails 使用 AJAX 没反应 at 2017年03月02日

    create.js.rjs 替换为 create.js.erb 代码换为: $("#cart").html('<%=escape_javascript(render :partial => '/carts/cart', :object=>@cart) %>')

    减少方法类似

    另: _cart 可能会报错 line_items NilClass,修改: format.js { @cart = current_cart}

  • application.html.erb where line #6 raised:TypeError: 对象不支持此属性或方法 at 2017年02月08日

    'coffee-script-source' 版本问题,把 Gemfile.lock 中'coffee-script-source' 版本改到 1.8.0 重启项目即可。

  • 安装 Rails,各种不成功啊·求帮助! at 2017年02月07日

    编辑 RailsInstaller\Ruby2.3.0\bin\rails.bat 替换为: @ECHO OFF

    IF NOT "%~f0" == "~f0" GOTO :WinNT

    ECHO.This version of Ruby has not been built with support for Windows 95/98/Me.

    GOTO :EOF

    :WinNT

    @"%~dp0ruby.exe" "%~dpn0" %*

  • Windows 下 Ruby 2.0 下,SQLite 3 的 gem 加载失败。 at 2017年01月20日

    这个绝对牛逼,直接修改~\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\specifications\sqlite3-1.3.13-x86-mingw32.gemspec

    s.require_paths=["lib"] 改成 s.require_paths= ["lib/sqlite3_native"]

    验证成功!

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