starvedcat

Rails 本地开发,访问网站巨慢,你们都是怎么解决的?

  •  
  •   starvedcat · Nov 23, 2016 · 9817 views
    This topic created in 3635 days ago, the information mentioned may be changed or developed.
    1. 点一个链接,要等 20 秒左右才打开。。。。
    2. 玩具 APP 也巨慢,不是代码问题
    3. 本地开发 Java PHP 网页都是秒开,不是性能问题
    4. 部署到远程( Heroku ),点链接都是秒开 已经尝试了网上说的一些方法,比如改 config\environments\development.rb ,把 cache 都打开。然而并没有显著的改善!!

    求助了

    Supplement 1  ·  Nov 23, 2016
    用了 rails 4 ,速度快多了。。。。然而为什么 5 就这么慢
    15 replies  •  2018-06-28 12:22:02 +08:00
    msg7086
    msg7086
    Nov 23, 2016
    1
    我假设你的 Rails 程序运行在 Linux 下?
    starvedcat
    starvedcat
    OP
    Nov 23, 2016
    2
    @msg7086 windows ……
    msg7086
    msg7086
    Nov 23, 2016
    3
    @starvedcat 那么你需要让你的 Rails 程序运行在 Linux 下。虚拟机搞起。
    starvedcat
    starvedcat
    OP
    Nov 23, 2016
    4
    @msg7086 尝试使用 rails 4 建立项目 速度飞起。。。。
    lightening
    lightening
    Nov 23, 2016
    5
    Windows 一直是二等公民。以前 DHH 说过要用 Rails 5 要用 EventMachine ,就无法在 Windows 下运行了。虽然最好好像还是没用。
    df4VW
    df4VW
    Nov 23, 2016
    6
    现在 docker 支持的这么好, windows 完全无所谓啊。用 container 跑吧,反正最后也是部署到 linux
    cosmosz
    cosmosz
    Nov 23, 2016❤️1
    7
    把 asset debug 关了 `config.asset.debug=false`
    wwulfric
    wwulfric
    Nov 23, 2016
    9
    把 asset debug 关了 `config.asset.debug=false`
    wwulfric
    wwulfric
    Nov 23, 2016❤️1
    10
    > 把 asset debug 关了 `config.asset.debug=false`

    一般就是这个原因
    starvedcat
    starvedcat
    OP
    Nov 23, 2016
    11
    会不会是因为 rails 5 默认的 server 从 Webrick 改成了 Puma 的原因。。
    taxiangdeni
    taxiangdeni
    Nov 23, 2016 via iPhone
    12
    @lightening linux 是二等公民, win 肯定是二等开外吧
    cxbig
    cxbig
    Nov 23, 2016
    13
    你本地是什么 service 环境?
    我这 macOS 和 Docker 都是秒开啊
    Gem
    Gem
    Nov 24, 2016
    14
    看到有同学说使用 rails g 命令经常卡住,有知道这是什么导致的吗?
    331718489
    331718489
    Jun 28, 2018
    15
    谢谢撸主,我是明知道 window 有虎,偏向 windows 行。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1020 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 18:50 · PVG 02:50 · LAX 10:50 · JFK 13:50
    ♥ Do have faith in what you're doing.