---
title: "rails3新建项目模板"
author: "ZoOL"
date: "2011-02-09T17:15:51Z"
tags: []
categories: ["编程语言"]
slug: "rails3"
draft: false
lastmod: "2011-02-09T17:15:51Z"
id: 902112
url: "https://zool.iteye.com/blog/902112"
---

rails 新建项目可以时加 -m 参数来使用预设模板

 

使用前提

 

\*nix系统

 

sqlite3/mysql等数据库已经安装完毕

 

git

 

rails  &gt;= 3.0.4  (3.0.4修复了不能使用https模板文件的bug)

 

代码

 

```
rails new my_app -T -J -m  https://gist.github.com/777670.txt
```

 

自动安装gem,使用devise, haml, rspec,jquery等

 

自动设置中文语言，设置时区

 

自动删除index.html等文件

 

配置文件是我自己使用的，可能不适合大多数人。 欢迎大家fork后修改自己的模板