# Kunkka **Repository Path**: martin/Kunkka ## Basic Information - **Project Name**: Kunkka - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2013-12-12 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #Rails之15分钟玩转七牛云存储与CKEditor ![Kunkka](http://fc04.deviantart.net/fs70/f/2012/292/1/0/dota2_kunkka_by_risq55-d5i8xs8.jpg?raw=true) ### 安装指南 ``` bash $ sudo apt-get install curl git $ curl -L get.rvm.io | bash -s stable $ rvm requirements $ rvm install 2.0.0 $ rvm use 2.0.0 --default $ gem i bundler $ git clone http://git.oschina.net/turristan/Kunkka.git $ cd Kunkka $ bundle install --without production $ rake db:migrate $ mv config/application.yml.sample config/application.yml ``` 修改(config/application.yml),填入对应内容 ``` bash $ rails s ``` ### Start from Scratch ``` bash $ sudo apt-get install curl git $ curl -L get.rvm.io | bash -s stable $ rvm requirements $ rvm install 2.0.0 $ rvm use 2.0.0 --default $ gem i rails $ rails new kunkka -B # "kunkka"只是个项目名 随意取 $ cd kunkka ``` 参照[Gemfile](./Gemfile)修改(Gemfile),可以去掉**production group** ``` bash $ bundle install $ rails g figaro:install ``` 参照[application.yml.sample](./config/application.yml.sample)修改(config/application.yml),填入对应内容 参照[carrierwave.rb](./config/initializers/carrierwave.rb)配置(config/initializer/carrierwave.rb) ``` bash $ rails g layout foundation4 --force $ rails g simple_form:install --foundation $ rails g ckeditor:install --orm=active_record --backend=carrierwave $ rails g scaffold article title:string content:text ``` Include ckeditor javascrippts (application.js) ``` //= require ckeditor/override //= require ckeditor/init ``` 修改(app/uploders/)文件夹下的两个文件,将 ``` # Choose what kind of storage to use for this uploader: storage :file ``` 改为: ``` # Choose what kind of storage to use for this uploader: storage :qiniu ``` 参照[_form.html.erb](./app/views/articles/_form.html.erb)修改(app/views/articles/_form.html.erb) ``` $ rake db:migrate $ rails s ``` (app/view/aritles)下的其它文件可以不改动。project中的改动只是为了稍微满足一下审美需求。 Test && Enjoy! #OVER