文章列表
项目升级rails 2 -〉 rails 3
- 博客分类:
- 备忘
1: 升级rubygems为1.3.7
sudo gem update --system
2:安装rails 3.0依赖的包
1)
sudo gem install tzinfo builder i18n memcache-client rack rake rack-test erubis mail text-format thor bundler
2)
sudo gem install rack-mount
3:安装rails 3.0
gem install rails --pre -v=3.0.0 ...
Icon-blank http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html
检查本地时间和时间服务器时间的时
Icon-blank ntpdate cn.pool.ntp.org
使服务器时间和时间服务器同步
Icon-blank sudo ntpdate cn.pool.ntp.org
系统时间文章
Icon-blank http://marshal.easymorse.com/archives/1395
开机启动
Icon-blank update-rc.d apachectl defaults
查看硬盘容量剩余
Icon-blank df -h (1024进位)
df -H (1000进位)
a =Magick::Image.read("/home/sunchi/9.jpg")
拍摄信息
a[0].get_exif_by_entry("DateTimeOriginal")[0][1]
a[0].get_exif_by_entry("DateTimeDigitized")[0][1]
mac ror
Icon-blank 1.https://gist.github.com/836679
2.rvm install ruby-1.9.1-p378
3.http://superuser.com/questions/208259/installing-ruby-1-9-1-on-os-x-with-rvm-getting-error-i-cant-make-sense-of
4. 注意: 用以前的ruby-mysql 安mysql driver 会出错 ,问题的原因还没找到
5. 用gem 安装 mysql,有UTF-8 的问题
6. brew mysql.rv 版本
https: ...
page.visual_effect :fade, item, :duration => 0.5
page.delay 0.5 do
page.visual_effect :highlight, "other_dom_object", :duration => 0.5
end
在public/javascript/swfupload.js 中
this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES);
把"SELECT_FILES" 改为 "SELECT_FILE", 选择文件时只能选择一个,否则可以选择多张
有可能与下边这行有关
this.ensureDefault("button_placeholder_id", null);
def update
@face = Face.find_by_user_id(session[:user_id],:conditions => "parent_id is null" )
respond_to do |format|
if @face.update_attributes(params[:face])
# flash[:notice] = 'Face was successfully updated.'
# format.html { redirect_to(edit_user_path(@fac ...