原创作者: hideto   阅读:1618次   评论:0条   更新时间:2011-05-26    
Rails自带了development、test和production三个environments,而我们可以轻松添加自己的environment:
1,修改database.yml
staging:
  adapter: mysql
  database: store_staging
  user: root
  password: 
  host: localhost


2,添加enviromnets/staging.rb
# ...
config.log_level = :debug
# ...


3,创建数据库
mysqladmin create store_staging -u root -p
rake db:migrate RAILS_EVN=staging


4,以staging环境启动Server
script/server -e staging
评论 共 0 条 请登录后发表评论

发表评论

您还没有登录,请您登录后再发表评论

文章信息

Global site tag (gtag.js) - Google Analytics