首先安装rails3, 目前版本是3.0.0.RC
gem install rails --pre
开始新建
首先看一下rails3 的新脚本
zool@zool-laptop:~/workspace$ rails
Usage:
rails new APP_PATH [options]
Options:
-b, [--builder=BUILDER] # Path to an application builder (can be a filesystem path or URL)
[--dev] # Setup the application with Gemfile pointing to your Rails checkout
[--edge] # Setup the application with Gemfile pointing to Rails repository
[--skip-gemfile] # Don't create a Gemfile
-m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL)
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db)
# Default: sqlite3
-O, [--skip-active-record] # Skip Active Record files
-J, [--skip-prototype] # Skip Prototype files
-T, [--skip-test-unit] # Skip Test::Unit files
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /home/zool/.rvm/rubies/ruby-1.8.7-p299/bin/ruby
-G, [--skip-git] # Skip Git ignores and keeps
Runtime options:
-f, [--force] # Overwrite files that already exist
-p, [--pretend] # Run but do not make any changes
-s, [--skip] # Skip files that already exist
-q, [--quiet] # Supress status output
Rails options:
-v, [--version] # Show Rails version number and quit
-h, [--help] # Show this help message and quit
Description:
The 'rails new' command creates a new Rails application with a default
directory structure and configuration at the path you specify.
Example:
rails new ~/Code/Ruby/weblog
This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
See the README in the newly created application to get going.
开始新建项目
zool@zool-laptop:~/workspace$ rails new imatrix -d=mysql -J -T
create
create README
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/helpers/application_helper.rb
create app/views/layouts/application.html.erb
create app/controllers/application_controller.rb
create app/mailers
create app/models
create config
create config/routes.rb
create config/application.rb
create config/environment.rb
create config/environments
create config/environments/test.rb
create config/environments/development.rb
create config/environments/production.rb
create config/initializers
create config/initializers/backtrace_silencers.rb
create config/initializers/mime_types.rb
create config/initializers/secret_token.rb
create config/initializers/inflections.rb
create config/initializers/session_store.rb
create config/locales
create config/locales/en.yml
create config/boot.rb
create config/database.yml
create db
create db/seeds.rb
create doc
create doc/README_FOR_APP
create lib
create lib/tasks
create lib/tasks/.gitkeep
create log
create log/server.log
create log/production.log
create log/development.log
create log/test.log
create public
create public/500.html
create public/robots.txt
create public/index.html
create public/favicon.ico
create public/422.html
create public/404.html
create public/images
create public/images/rails.png
create public/stylesheets
create public/stylesheets/.gitkeep
create public/javascripts
create public/javascripts/.gitkeep
create public/javascripts/application.js
create script
create script/rails
create tmp
create tmp/sessions
create tmp/sockets
create tmp/cache
create tmp/pids
create vendor/plugins
create vendor/plugins/.gitkeep
备忘:
1. rails3 新建项目需要用rails new 来新建
2. -d=mysql 指定使用mysql数据, 默认为sqlite3
3. -J 跳过建立prototype文件, 现在用JQuery比较多, 之后项目准备用JQ
4.-T 跳过建立Test::Unit文件, 之后的测试准备用spec
5. rail3默认建立gitignore和gitkeep文件, 可以用 -G 参数跳过
然后编辑config/database.yml
rake db:create
rake db:migrate
启动服务
rails s
备忘:
rails3 中将原来的script/* 都合并为一个脚本 script/rails
因此rails2中的 script/server 就改为了 rails server ,并且由于提供了short-cut,直接用 rails s就可以启动
建立git
git init
git add .
git commit -m 'imatrix init'
git remote add origin git@github.com:zhooul/imatrix.git
git push origin master
备注:
github的ssh配置
http://help.github.com/linux-key-setup/
分享到:
相关推荐
day-day-up 记录每天的学习 所有记录暂时移植到readme 从11月开始链接附上 尽量做到详细 9月17日 1 动态规划 0-1背包问题。 2 cnn特征图大小计算。 3 线性回归的描述以及基本假设。 4 leetcode 无重复字符的最长子串...
standard Python libraries, and step-by-step tutorial lessons, you will discover what linear algebra is, the importance of linear algebra to machine learning, vector, and matrix operations, matrix ...
Algebra I Basic Notions Of Algebra - Kostrikin A I , Shafarevich I R Algebra Sucsess In 20 Minutes a Day - LearningExpress Algebraic D-modules - A. Borel et. al Algebraic Groups and Discontinuous ...
You can choose to work through the lessons one per day, one per week, or at your own pace. I think momentum is critically important, and this book is intended to be read and used, not to sit idle. I ...
Every day, companies struggle to scale critical applications. As traffic volume and data demands increase, these applications become more complicated and brittle, exposing risks and compromising ...
/// 丢弃B帧的个数,取值为0,1,2,0-不丢,1-丢1个B帧,2-丢2个B帧; /// 在多路播放时,将B帧丢弃可以降低CPU的利用率, /// 不过当一路时,最好不丢弃B帧 /// public int throwNum = 1; public int ...
Non-negative matrix factorization to find the independent features in a dataset * Evolving intelligence for problem solving -- how a computer develops its skill by improving its own code the more it ...
1. 30-Day Money Back Guarantee 2. Full Delphi Source. No DLLs or OCXs. 3. More comprehensive Help Files. 4. Full Royalty Free rights to include ESBPCS in your Applications (see License.txt for more...
ALSA Soundcard Matrix - ALSA ("Advanced Linux Sound Architecture") supported audio- cards or chipsets. ALSA provides audio and MIDI functionality to the Linux operating system. OSS Sound Card List - ...
- Support for MATRIX licence key added. This key does not require a special key driver. It simply needs a PC and a windows version which supports USB ports. - When using the driver in ...
1049 I Think I Need a Houseboat 简单题 1028 Flip and Shift 简单题,可以DP/BFS/……,但是实际上有数学方法可直接判断出来 1026 Modular multiplication of polynomials 简单题,有比较简单的好算法 1307 ...
1049 I Think I Need a Houseboat 简单题 1028 Flip and Shift 简单题,可以DP/BFS/……,但是实际上有数学方法可直接判断出来 1026 Modular multiplication of polynomials 简单题,有比较简单的好算法 1307 ...