starvedcat

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

  •  
  •   starvedcat · Nov 23, 2016 · 9296 views
    This topic created in 3487 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
        1
    msg7086  
       Nov 23, 2016
    我假设你的 Rails 程序运行在 Linux 下?
    starvedcat
        2
    starvedcat  
    OP
       Nov 23, 2016
    @msg7086 windows ……
    msg7086
        3
    msg7086  
       Nov 23, 2016
    @starvedcat 那么你需要让你的 Rails 程序运行在 Linux 下。虚拟机搞起。
    starvedcat
        4
    starvedcat  
    OP
       Nov 23, 2016
    @msg7086 尝试使用 rails 4 建立项目 速度飞起。。。。
    lightening
        5
    lightening  
       Nov 23, 2016
    Windows 一直是二等公民。以前 DHH 说过要用 Rails 5 要用 EventMachine ,就无法在 Windows 下运行了。虽然最好好像还是没用。
    df4VW
        6
    df4VW  
       Nov 23, 2016
    现在 docker 支持的这么好, windows 完全无所谓啊。用 container 跑吧,反正最后也是部署到 linux
    cosmosz
        7
    cosmosz  
       Nov 23, 2016   ❤️ 1
    把 asset debug 关了 `config.asset.debug=false`
    ryanzyy
        8
    ryanzyy  
       Nov 23, 2016   ❤️ 1
    wwulfric
        9
    wwulfric  
       Nov 23, 2016
    把 asset debug 关了 `config.asset.debug=false`
    wwulfric
        10
    wwulfric  
       Nov 23, 2016   ❤️ 1
    > 把 asset debug 关了 `config.asset.debug=false`

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