From 5d02612465612aef3e015da5e9539e8c02408608 Mon Sep 17 00:00:00 2001 From: Shao Date: Fri, 14 Feb 2014 01:56:35 +0800 Subject: [PATCH 1/2] Changed Carrierwave Storage --- config/initializers/carrierwave.rb | 7 ------- config/initializers/carrierwave.rb.example | 8 +++++++- 2 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 config/initializers/carrierwave.rb diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb deleted file mode 100644 index b3d9e01..0000000 --- a/config/initializers/carrierwave.rb +++ /dev/null @@ -1,7 +0,0 @@ -CarrierWave.configure do |config| - config.storage = :upyun - config.upyun_username = "shaohuan" - config.upyun_password = '2013@nus' - config.upyun_bucket = "wanmen" - config.upyun_bucket_domain = "img.wanmen.org" -end \ No newline at end of file diff --git a/config/initializers/carrierwave.rb.example b/config/initializers/carrierwave.rb.example index c7692c6..c93efce 100644 --- a/config/initializers/carrierwave.rb.example +++ b/config/initializers/carrierwave.rb.example @@ -4,4 +4,10 @@ CarrierWave.configure do |config| config.upyun_password = '密码' config.upyun_bucket = "空间名" config.upyun_bucket_domain = "空间名.b0.upaiyun.com 或 使用你独立配置的域名" -end \ No newline at end of file +end + +/*CarrierWave.configure do |config| + config.permissions = 0666 + config.directory_permissions = 0777 + config.storage = :file +end*/ From 36df11ae0b464745564cc8d62351698e14dd9478 Mon Sep 17 00:00:00 2001 From: Shao Date: Fri, 14 Feb 2014 02:02:45 +0800 Subject: [PATCH 2/2] Updated ReadMe --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dc78715..9a048b5 100644 --- a/README.md +++ b/README.md @@ -14,24 +14,27 @@ Schrödinger's cat - Ruby on Rails * `config/database.yml` database names and the database user/password * load the database from schema * `rake db:schema:load` + * Carrierwave credentials + * copy the carrierwave file + * `cp config/initializers/carrierwave.rb.example config/initializers/carrierwave.rb` + * configure the carrierwave criteria + * `config/initializers/carrierwave.rb' Upyun is suggested. You can also use local file system * run * `rails server` ## Dev Guide * User System * Use devise for user authentication - * 用户登录系统包 * `gem 'devise'` * Database * Use mysql for database - * mysql包 * `gem 'mysql2'` * ubuntu * `sudo apt-get install mysql-client libmysqlclient-dev` * Mail System * `gem 'tlsmail'` * `config/environments/development.rb` set up the third party oauth2 logins - * sending mail from smtp mail servers用来发smtp邮件 + * sending mail from smtp mail servers * SNS Auth * `gem 'omniauth'` * `gem 'omniauth-weibo-oauth2'`