显示标签为“ruby”的博文。显示所有博文
显示标签为“ruby”的博文。显示所有博文

星期日, 四月 10, 2011

Rails 3可能遇到的问题

1,windows下mysql驱动问题, 不用安装mysql2,而用mysql,具体如下。
#修改Gemfile
#gem 'mysql2'
gem 'mysql'

#运行命令
bundle install

#修改环境变量
将%MYSQL_HOME%\bin\加入PATH。

#修改database.yml
修改adapter使用mysql。

2, 使用jQuery,而不用Prototype。
参见:https://github.com/rails/jquery-ujs
#修改Gemfile
gem 'jquery-rails'

#运行命令
bundle install

#修改environment.rb
require 'openssl'
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE

#运行命令
rails generate jquery:install

要使用JQuery UI,请使用:rails generate jquery:install --ui

星期六, 十月 23, 2010

Rails中的插件

分页插件will_paginate
http://wiki.github.com/mislav/will_paginate/
Rails分页插件,非常强大,几乎是Rails中最好的分页插件。

Excle插件Spreadsheet
http://github.com/jacobat/ruby-spreadsheet
Excle读入,导出插件

PDF插件prawn
http://github.com/sandal/prawn
Prawn is a PDF writing library for Ruby designed to be tiny, fast, and nimble,just like the majestic sea creature.

报表插件Ruport
http://github.com/ruport/ruport
http://ruportbook.com/
Ruby Reports (Ruport) is an extensible reporting system.
For common tasks, Ruport provides formatters for CSV, HTML, PDF, and text- based reports. However, the real power lies in building custom report controllers and formatters. The base formatting libraries provide a number of helper functions that will let you build complex reports while maintaining a DRY and consistent interface.

缓存插件cache-money
http://github.com/nkallen/cache-money
cache-money是Twitter最近贡献一个缓存插件,和常见的cache plugin不同,它提供的是write-through的缓存模式:在ActiveRecord对象更新的时候不是将缓存中的数据清除,而是直接将更新的内容写入到缓存中去。

Sacffold插件activescaffold
http://github.com/activescaffold/active_scaffold

Phusion passenger
http://www.modrails.com/
Phusion Passenger™ — a.k.a. mod_rails or mod_rack — makes deployment of Ruby web applications, such as those built on the revolutionary Ruby on Rails web framework, a breeze. It follows the usual Ruby on Rails conventions, such as “Don’t-Repeat-Yourself”.

fxri
FXRI is a FXRuby Interface to RI, that supports search-on-typing. FXRI is a small little program, that tries to provide the desired information as fast as possible.

ruote
http://ruote.rubyforge.org/
Ruote is a workflow engine written in Ruby. Ruote is not a state machine library.

QueryReviewer
QueryReviewer is an advanced SQL query analyzer.
http://github.com/boulder/query_reviewer