Rails自带了development、test和production三个environments 我们可以添加Staging

database.yml

staging:  
  adapter: mysql  
  database: store_staging  
  user: root  
  password:   
  host: localhost  

 添加enviromnets/staging.rb

# ...  
config.log_level = :debug  
# ...  

 创建数据库

mysqladmin create store_staging -u root -p  
rake db:migrate RAILS_EVN=staging  

 启动

rails s -e staging  

 

相关文章:

  • 2021-08-31
  • 2023-03-24
  • 2021-09-14
  • 2022-12-23
  • 2021-12-01
  • 2021-10-09
猜你喜欢
  • 2021-06-01
  • 2022-02-07
  • 2022-12-23
  • 2021-07-04
  • 2021-07-03
  • 2021-11-08
  • 2022-12-23
相关资源
相似解决方案