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'` 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*/