歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> 提高Rails new時bundle install運行速度

提高Rails new時bundle install運行速度

日期:2017/2/28 15:33:56   编辑:Linux教程

最近在新建rails項目時,rails new老是卡在bundle install那裡,少則五分鐘,多則幾十分。

這是因為rails new時自動會運行bundle install,而bundle install會自動去rubygems.org查找是否有更新。

但需要的gems我早安裝好了,且不用更新,所以上面步驟就可省了。強烈建議rails黨委取消rails new時自動查找gems更新功能!

解法很簡單

rails new my_app --skip-bundle

cd my_app

bundle install --local

另外,最新版bundler速度提高不少,建議使用,也能提速

gem install bundler --pre

Copyright © Linux教程網 All Rights Reserved