Ror项目各目录说明(文件夹说明)

对ror项目目录的划分还不是很清楚,逛http://guides.rubyonrails.org/getting_started.html 时发现了这个表格:

File/FolderPurpose
app/Contains the controllers, models, views and assets for your application. You’ll focus on this folder for the remainder of this guide.
config/Configure your application’s runtime rules, routes, database, and more. This is covered in more detail inConfiguring Rails Applications
config.ruRack configuration for Rack based servers used to start the application.
db/Contains your current database schema, as well as the database migrations.
doc/In-depth documentation for your application.
Gemfile
Gemfile.lock
These files allow you to specify what gem dependencies are needed for your Rails application.
lib/Extended modules for your application.
log/Application log files.
public/The only folder seen to the world as-is. Contains the static files and compiled assets.
RakefileThis file locates and loads tasks that can be run from the command line. The task definitions are defined throughout the components of Rails. Rather than changing Rakefile, you should add your own tasks by adding files to the lib/tasks directory of your application.
README.rdocThis is a brief instruction manual for your application. You should edit this file to tell others what your application does, how to set it up, and so on.
script/Contains the rails script that starts your app and can contain other scripts you use to deploy or run your application.
test/Unit tests, fixtures, and other test apparatus. These are covered in Testing Rails Applications
tmp/Temporary files
vendor/A place for all third-party code. In a typical Rails application, this includes Ruby Gems, the Rails source code (if you optionally install it into your project) and plugins containing additional prepackaged functionality.

我来试着翻译下:

文件夹/文件                            说明


app目录                        项目的 控制器、模型、视图 和 assets , 你的主要精力将花在此目录


config目录                    配置项目运行规则、数据库等等。这里包含更多的rails项目配置细节


config.ru文件                


db目录                          包含你当前的数据库模式,以及数据库迁移。 


doc目录                         项目详细文档


Gemfile                 这些文件用来指定你的项目gem依赖
Gemfile.lock     


lib目录                           项目扩展包


log目录                          系统日志文件


public目录                     公共资源。包含静态文件和链接资源


RakeFile                        


README.rdoc       readme文件


script目录              项目运行或清理的脚步


test目录                 单元测试


tmp目录                  历史文件


vendor目录             第三方代码,插件等



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值