- Oct 23 Thu 2008 09:22
-
DBD::ADO設定CommandTimeout
- Dec 27 Thu 2007 20:59
-
常用的ruby程式庫
rails
mongrel
mongrel_cluster
acts_as_cached
acts_as_ferret
capistrano
fcgi
gettext
sqlite3-ruby
mechanize
ruby-net-ldap
ruby-openid
sendfile
log4r
rspec
ZenTest
- Sep 30 Sun 2007 20:51
-
被rails排擠的DB adapter
受害者有Oracle、SQLServer、Sybase,以後要記得用gem安裝,不要出錯傻傻查半天。
gem install activerecord-oracle-adapter
gem install activerecord-sqlserver-adapter
gem install activerecord-sybase-adapter
gem install activerecord-oracle-adapter
gem install activerecord-sqlserver-adapter
gem install activerecord-sybase-adapter
- Aug 28 Tue 2007 20:46
-
增加rails plugin來源
http://svn.techno-weenie.net/projects/plugins/有很多好用的plugin,可以在rails專案中執行
script/plugin source http://svn.techno-weenie.net/projects/plugins/
把repository加入來源清單。之後用
script/plugin source http://svn.techno-weenie.net/projects/plugins/
把repository加入來源清單。之後用
- Jul 12 Thu 2007 20:44
-
to_xml不要dasherize
加到application.rb:
module ActiveSupport #:nodoc:
module CoreExtensions #:nodoc:
module Hash #:nodoc:
module Conversions
unless method_defined? :old_to_xml
alias_method :old_to_xml, :to_xml
def to_xml(options = {})
options.merge!(:dasherize => false)
old_to_xml(options)
end
end
end
end
module Array #:nodoc:
module Conversions
unless method_defined? :old_to_xml
alias_method :old_to_xml, :to_xml
def to_xml(options = {})
options.merge!(:dasherize => false)
old_to_xml(options)
end
end
end
end
end
end
module ActiveRecord #:nodoc:
module XmlSerialization
unless method_defined? :old_to_xml
alias_method :old_to_xml, :to_xml
def to_xml(options = {})
options.merge!(:dasherize => false)
old_to_xml(options)
end
end
end
end
module ActiveSupport #:nodoc:
module CoreExtensions #:nodoc:
module Hash #:nodoc:
module Conversions
unless method_defined? :old_to_xml
alias_method :old_to_xml, :to_xml
def to_xml(options = {})
options.merge!(:dasherize => false)
old_to_xml(options)
end
end
end
end
module Array #:nodoc:
module Conversions
unless method_defined? :old_to_xml
alias_method :old_to_xml, :to_xml
def to_xml(options = {})
options.merge!(:dasherize => false)
old_to_xml(options)
end
end
end
end
end
end
module ActiveRecord #:nodoc:
module XmlSerialization
unless method_defined? :old_to_xml
alias_method :old_to_xml, :to_xml
def to_xml(options = {})
options.merge!(:dasherize => false)
old_to_xml(options)
end
end
end
end
- Jul 11 Wed 2007 20:43
-
Rails和REST
- Apr 08 Sun 2007 20:39
-
安裝Qt和QtRuby
下載Qt/Mac
下載QtRuby
安裝Qt:
./configure -qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libjpeg -no-framework -fast -no-exceptions -no-stl -no-debug; make; sudo make install
安裝QtRuby:
./configure --enable-mac --with-qt-dir=/usr/local/Trolltech/Qt-4.2.3; make; sudo make install
cd /opt/local/lib/ruby/site_ruby/1.8/i686-darwin8.9.1; sudo mv qtruby4.so qtruby4.bundle
用irb測試:
require 'Qt'
a = Qt::Application.new(ARGV)
hello = Qt::PushButton.new('Hello World!', nil)
hello.resize(150, 50)
hello.show()
a.exec()
- Mar 20 Tue 2007 20:38
-
Jetty + JRuby + Rails
- Mar 15 Thu 2007 20:36
-
CRUD-HTTP-SQL-Action
- Mar 07 Wed 2007 20:35
-
安裝WebORB
在rails專案目錄中執行
ruby script/plugin install http://themidnightcoders.net:8089/svn/weborb
就會把WebORB安裝到vendor目錄。安裝程式會在config目錄中會建立WEB-INF/flex目錄,存放設定檔, 此外,還會安裝一個weborb_controller.rb到app/controller目錄,public目錄中會多一個examples目錄, 內有可以使用的範例。執行
ruby script/plugin install http://themidnightcoders.net:8089/svn/weborb
就會把WebORB安裝到vendor目錄。安裝程式會在config目錄中會建立WEB-INF/flex目錄,存放設定檔, 此外,還會安裝一個weborb_controller.rb到app/controller目錄,public目錄中會多一個examples目錄, 內有可以使用的範例。執行
- Feb 17 Sat 2007 20:33
-
無名相簿備份程式
FreeBSD和OS X使用者可以下載wretch.rb,使用前需先安裝Ruby和mechanize;Windows使用者可以下載wretch.exe,下載後直接執行,不需要安裝其它程式。若在FreeBSD或OS X執行,被下載的相片會被儲存在「帳號/相簿編號_相簿名稱」目錄,在Windows則是儲存在「帳號/相簿編號」目錄。使用方法:
備份所有相簿: wretch 帳號 -a
備份指定相簿: wretch 帳號 相簿編號
備份多本相簿: wretch 帳號 相簿編號1 相簿編號2 相簿編號3 相簿編號N
備份有密碼的相簿: wretch -p 密碼 帳號 相簿編號
備份所有相簿: wretch 帳號 -a
備份指定相簿: wretch 帳號 相簿編號
備份多本相簿: wretch 帳號 相簿編號1 相簿編號2 相簿編號3 相簿編號N
備份有密碼的相簿: wretch -p 密碼 帳號 相簿編號
- Feb 13 Tue 2007 20:33
-
OS X安裝ruby和rails