惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cloudbric
Cloudbric
有赞技术团队
有赞技术团队
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
Threat Research - Cisco Blogs
L
LangChain Blog
Simon Willison's Weblog
Simon Willison's Weblog
Project Zero
Project Zero
Latest news
Latest news
S
Schneier on Security
Cisco Talos Blog
Cisco Talos Blog
MyScale Blog
MyScale Blog
C
Check Point Blog
IT之家
IT之家
P
Palo Alto Networks Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
CERT Recently Published Vulnerability Notes
Scott Helme
Scott Helme
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
G
Google Developers Blog
T
Tor Project blog
T
Threatpost
D
DataBreaches.Net
博客园 - 【当耐特】
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Troy Hunt's Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Vercel News
Vercel News
云风的 BLOG
云风的 BLOG
NISL@THU
NISL@THU
P
Privacy & Cybersecurity Law Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
Cisco Blogs
博客园_首页
S
Securelist
T
The Exploit Database - CXSecurity.com
Last Week in AI
Last Week in AI
量子位
U
Unit 42
Know Your Adversary
Know Your Adversary
Hugging Face - Blog
Hugging Face - Blog
S
Security Affairs
Google Online Security Blog
Google Online Security Blog
Hacker News: Ask HN
Hacker News: Ask HN
Webroot Blog
Webroot Blog
S
SegmentFault 最新的问题
Engineering at Meta
Engineering at Meta
N
News and Events Feed by Topic
P
Proofpoint News Feed
阮一峰的网络日志
阮一峰的网络日志

博客园 - 感動常在

python 替换查找工具,闲暇之余写的,不足之处,见凉。 worldpress 新浪微博同步插件0.1版 linux 与window 相互共享命令 linux添加超级管理员用户,修改,删除用户 linux 定时备份数据库 Linux,find 和perl正则替换文件内容、tar解压缩、cp复制、rm删除 - 感動常在 - 博客园 lamp+vsftp +zend optimizer 配置,需要注意的地方 rhel5.4 yum可用华中科技大学的源 http://centos.ustc.edu.cn/ 執行軟件更新 windows下Rails安装MySql驱动的配置 rails 用命令scaffold生成數據模型 wndow環境下運行Ruby on Rails window下apache用戶認証 - 感動常在 - 博客园 asp.net試題(五) 收錄PHP試題 - 感動常在 - 博客园 求兩個數的,最大公約數 - 感動常在 - 博客园 asp.net 試題(四) 求一組9位數且不重複(1-9組成),滿足前n位能被n整除,例如:取先二位能被2整除,取先三位能被3整除...取先九位能被9整除。 字符串位移包含 - 感動常在 - 博客园 任意調整CUP成直綫 - 感動常在 - 博客园
Rails命令大全
感動常在 · 2009-09-16 · via 博客园 - 感動常在

一.铁道
1.1 创建一个Rails应用程序
 $ rails app_name
 可选项:
 -d, database=xxx 指定安装一个数据库(mysql oracle postgresql sqlite2 sqlite3 ), 默认情况下是数据库
 -r, ruby-path= 指定Ruby的安装路径,如果没有指定,scripts使用env去找Ruby
 -f, freeze (冻结)freezes Rails在vendor/rails目录
 
1.2 API Documentation
 $ gem_server
 启动一个WEBrick服务器。这时候你可以通过Http://localhost:8808/ 打开浏览器去查看rails API文档
 
1.3 Rake
 rake db:fixtures:load
  # 载入fixtures到当前环境的数据库
  # 载入指定的fixtures使用FIXTURES=x,y
 rake db:migrate
 # 迁移数据库通过在db/migrate目录下的脚本.可以指定版本号通过VERSION=x
 rake db:schema:dump
 # 创建一个db/schema.rb文件,通过AR能过够支持任何数据库去使用
 rake db:schema:load
 # 再入一个schema.rb文件进数据库
 rake db:sessions:clear
 # 清空sessions表
 rake db:sessions:create
 # 用CGI::Session::ActiveRecordStore创建一个sessions表为用户
 rake db:structure:dump
 # 导出数据库结构为一个SQL文件
 rake db:test:clone
 # 重新创建一个测试数据库从当前环境数据库中
 rake db:test:clone_structure
 # 重新创建测试数据库从开发模式数据库
 rake db:test:prepare
 # 准备测试数据库并在入schema
 rake db:test:purge
 # 清空测试数据库
 rake doc:app
 # 创建HTML文件的API Documentation
 rake doc:clobber_app
 # 删除Documentation
 rake doc:clobber_plugins
 # 删除 plugin Documentation
 rake doc:clobber_rails
 # 删除Documentation
 rake doc:plugins
 # 产生Documation为所有安装的plugins
 rake doc:rails
 # 创建HTML文件的API Documentation
 rake doc:reapp
 # 强制重新创建HTML文件的API Documentation
 rake doc:rerails
 # 强制重新创建HTML文件的API Documentation
 rake log:clear
 # 清空目录log/下的所有日志文件
 rake rails:freeze:edge
 # Lock this application to latest Edge Rails. Lock a specific revision with REVISION=X
 rake rails:freeze:gems
 # Lock this application to the current gems (by unpacking them into vendor/rails)
 rake rails:unfreeze
 # Unlock this application from freeze of gems or edge and return to a fluid use of system gems
 rake rails:update
 # Update both scripts and public/javascripts from Rails
 rake rails:update:javascripts
 # Update your javascripts from your current rails install
 rake rails:update:scripts
 # Add new scripts to the application script/ directory
 rake stats
 # Report code statistics (KLOCs, etc) from the application
 rake test
 # Test all units and functionals
 rake test:functionals
  # Run tests for functionalsdb:test:prepare
 rake test:integration
 # Run tests for integrationdb:test:prepare
 rake test:plugins
 # Run tests for pluginsenvironment
 rake test:recent
 # Run tests for recentdb:test:prepare
 rake test:uncommitted
 # Run tests for uncommitteddb:test:prepare
 rake test:units
 # Run tests for unitsdb:test:prepare
 rake tmp:cache:clear
 # 清空tmp/cache目录下的所有文件
 rake tmp:clear
 # 清空session, cache, 和socket文件从tmp/目录
 rake tmp:create
 # 为sessions, cache, and sockets创建tmp/目录
 rake tmp:sessions:clear
 # 清空所有在tmp/sessions目录下的文件
 rake tmp:sockets:clear
 # 清空所有在tmp/sessions 目录下的ruby_sess.* 文件
 
1.4 Scripts
 script/about
 # 输出当前环境信息
 script/breakpointer
 # 启动断点server
 script/console
 # 启动交换式的Rails控制台
 script/destroy
 # 删除通过generators创建的文件
 script/generate
 # -> generators
 script/plugin
 # -> Plugins
 script/runner
 # 执行一个任务在rails上下文中
 script/server
 # 启动开发模式服务器http://localhost:3000
 //以下几个不知道怎么去使用
 script/performance/profiler
 script/performance/benchmarker
 script/process/reaper
 script/process/spawner
 
1.5 Generators
 ruby script/generate model ModelName
 ruby script/generate controller ListController show edit
 ruby script/generate scaffold ModelName ControllerName
 ruby script/generate migration AddNewTable
 ruby script/generate plugin PluginName
 ruby script/generate mailer Notification lost_password signup
 ruby script/generate web_service ServiceName api_one api_two
 ruby script/generate integration_test TestName
 ruby script/generate session_migration
 可选项:
 -p, --pretend Run but do not make any changes.
 -f, --force Overwrite files that already exist.
 -s, --skip Skip files that already exist.
 -q, --quiet Suppress normal output.
 -t, --backtrace Debugging: show backtrace on errors.
 -h, --help Show this help message.
 -c, --svn Modify files with subversion. (Note: svn must be in path)
 
1.6 Plugins
 script/plugin discover
 # discover plugin repositories
 script/plugin list
 # list all available plugins
 script/plugin install where
 # install the a€wherea€? plugin
 script/plugin install -x where
 # install where plugin as SVN external
 script/plugin install http://invisible.ch/projects/plugins/where
 script/plugin update
 # update installed plugins
 script/plugin source
 # add a source repository
 script/plugin unsource
 # removes a source repository
 script/plugin sources
 # lists source repositories

posted on 2009-09-16 15:01  感動常在  阅读(2409)  评论()    收藏  举报