mysql创建记录时报错:Mysql2::Error: Incorrect string value: '\xE5\xB0\x8F\xE5\xB1\x8B' for column 'name' at row 1: UPDATE `love_houses` SET `name` = '小屋', `updated_at` = '2018-04-24 10:59:41' WHERE `love_houses`.`id` = 1进入my...

Vicw.com用户头像 - XanderCheung XanderCheung 1066 0 0

scheduler = Rufus::Scheduler.new scheduler.in '3s' do ActiveRecord::Base.connection_pool.with_connection do # 执行动作 ActiveRecord::Base.clear_active_connections! end end

Vicw.com用户头像 - XanderCheung XanderCheung 939 0 0

概述为了防止系统出现操作故障和系统故障导致数据丢失,需要将全部或部分数据集合从应用主机的硬盘或阵列复制到其它的存储介质,下面将介绍linux中如何实现每天自动定时备份m...

Vicw.com用户头像 - XanderCheung XanderCheung 1501 0 0

编辑nginx配置文件worker_processes 1; error_log logs/error.log; error_log logs/error.log notice; error_log logs/error.log info; pid logs/nginx.pid; #user nobody; worker_processes 1; error_log logs/error.log; error_...

Vicw.com用户头像 - XanderCheung XanderCheung 1227 0 0

程序猿 - rails sunspot solr Connection Refused when reindex

first Install OpenJDK 8 JDKTo install OpenJDK 8 JDK using yum, run this command:sudo yum install java-1.8.0-openjdk-devel1.ps aux | grep solr to get solr process ID2.sudo kill <ID>, is the ID you found from 13.rm -rvf <path/to/solr> remov...

Vicw.com用户头像 - XanderCheung XanderCheung 1450 0 0

修改.bashrc文件vim ~/.bashrc添加:alias homels='cd /home/;ls':wq保存输入homels就相当于执行了两条命令cd /home/ls

Vicw.com用户头像 - XanderCheung XanderCheung 1105 0 0

datetime 类型在mysql中默认精度只到秒解决⽅法如下在Rails 4.2的Release Notes有下⾯⼀句话:Added support for fractional seconds for MySQL 5.6 and above可以看出Rails 4.2已经⽀持⽇期精度功能,关于mysql...

Vicw.com用户头像 - XanderCheung XanderCheung 1049 0 0

1.Gemfile增加gem 'exception_notification'2.新增 lib/exception_notifier/database_notifier.rb# coding: utf-8 # 异常通知 module ExceptionNotifier class DatabaseNotifier def initialize(_options) # do something with the optio...

Vicw.com用户头像 - XanderCheung XanderCheung 2667 0 0

将gem指定gem ‘lazy_high_charts’, :git => ‘git://github.com/lamoglia/lazy_high_charts.git’解决地址

Vicw.com用户头像 - XanderCheung XanderCheung 1163 0 0

1.下载linux版本的jdk tomcat maven的压缩版本我下载的是:jdk-7u80-linux-x64.tar.gzapache-maven-3.5.3-bin.tar.gzapache-tomcat-7.0.85.tar.gz解压的路径分别是/home/jdk1.7.0_80/home/apache-maven-3.5.3/home/apache-tomcat-7.0...

Vicw.com用户头像 - XanderCheung XanderCheung 969 0 0