自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 资源 (1)
  • 收藏
  • 关注

原创 rails in query

http://stackoverflow.com/questions/4307411/how-to-express-a-not-in-query-with-activerecord-railsI'm using this:Topic.where('id NOT IN (?)',actions)Where actions is an array with: [1,2,3,4,5]E

2016-02-23 15:56:54 454

原创 查看gem devise的源代码

$ EDITOR=vim bundle open devise$ vim$ echo $EDITOR$ vim ~/.bashrc加上这句 export EDITOR=vim$ . ~/.bashrc$ echo $EDITORvim$ bundle open devise

2016-02-22 11:51:58 478

原创 chmod 600 .ssh/authorized_keys修改权限

今天在服务器上配置了自己电脑的public key,但是还是不能直接免密码登录,原因是ssh 对目录的权限有要求,代码中要设置下新生成的config文件权限才行。~目录权限是750,~/.ssh 的是700, ~/.ssh/* 的是600,~/.ssh/config 是700-rw-rw-r-- 1 webuser webuser  396 Feb 19 04:20 a

2016-02-19 12:58:43 27023 1

原创 migrate遇到err mongoid[not found]

新开了个项目,数据库打算只用mysql,但是在migrate的时候失败,并且提示err: mongoid[not found]原因就是在Gemfile里写了一个有关mongoid的gem,搜索并删除就好了。

2016-02-06 09:40:15 475

原创 老项目换unicorn的大致步骤

老项目换unicorn的大致步骤:(1)修改config/application.rb删除 29     # assign log4r's logger as rails' logger. 30     log4r_config= YAML.load_file(File.join(File.dirname(__FILE__),"log4r.yml")) 31     Yam

2016-02-05 15:45:42 1055

原创 部署老系统出现的问题Gem::InstallError: net-ssh requires Ruby version >= 2.0

Gem::InstallError: net-ssh requires Ruby version >= 2.0修改Gemfile,变一下版本gem 'unicorn'group :test, :development do gem "rspec-rails", ">= 2.5.0" gem 'factory_girl', '2.6.4' gem 'factory_g

2016-02-04 19:22:45 2179

转载 在 Rails 中使用 Webpack

http://clarkdave.net/2015/01/how-to-use-webpack-with-rails/http://m.oschina.net/blog/464093 webpack 是一个很强大的打包工具,主要用于前端开发,可以和 bower,npm 很好的配合工作。它比 Rails 原本的前端管理模式要好很多,不过还是可以和 Sprockets

2016-02-04 11:48:57 1494

原创 checkout 到bit/master分支

249  git reset --hard bit/master  250  git pull  251  git branch --set-upstream-to=bit/master  252  git pull

2016-02-03 17:42:16 351

原创 Permission denied (publickey)

https://help.github.com/articles/error-permission-denied-publickey/$ ssh-keygenGenerating public/private rsa key pair.Enter file in which to save the key (/home/wz/.ssh/id_rsa):/home/w

2016-02-03 17:36:28 393

原创 ssh-key Permission denied (publickey)

https://help.github.com/articles/error-permission-denied-publickey/ $ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/wz/.ssh/id_rsa): /ho

2016-02-03 17:35:55 1087

原创 How to use user’s location in your app?

How to use user’s location in your app? there are two more settings(1)click the project-> Build Phases -> link Binary With Libraries -> click “+” -> search for “location” -> click the Core

2016-02-03 17:35:12 295

原创 How to use cocoa pod in your iOS project

https://cocoapods.org/(1)sudo gem install cocoapods(2)新建一个xcode应用(3)从终端进入应用目录,pod init(4) 修改生成的profile文件platform :ios, '8.0'use_frameworks! target 'MyApp' do  pod '

2016-02-03 17:34:36 261

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除