編輯ADO.rb,找到connect方法,在
handle.Open(dbname)

handle.BeginTrans()

Forth 發表在 痞客邦 留言(0) 人氣()


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

Forth 發表在 痞客邦 留言(0) 人氣()

受害者有Oracle、SQLServer、Sybase,以後要記得用gem安裝,不要出錯傻傻查半天。
gem install activerecord-oracle-adapter
gem install activerecord-sqlserver-adapter
gem install activerecord-sybase-adapter

Forth 發表在 痞客邦 留言(0) 人氣()

http://svn.techno-weenie.net/projects/plugins/有很多好用的plugin,可以在rails專案中執行
script/plugin source http://svn.techno-weenie.net/projects/plugins/
把repository加入來源清單。之後用

Forth 發表在 痞客邦 留言(0) 人氣()

加到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

Forth 發表在 痞客邦 留言(0) 人氣()

命令:
ruby script/generate scaffold_resource Product
routes.rb:

Forth 發表在 痞客邦 留言(0) 人氣()


下載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()

Forth 發表在 痞客邦 留言(0) 人氣()

所需軟體
Jetty 6
Ruby
JRuby
Ruby on Rails

Forth 發表在 痞客邦 留言(0) 人氣()



CRUD
HTTP
SQL
Action


Create
POST
INSERT
create


Read
GET
SELECT
show


Update
PUT
UPDATE
update


Delete
DELETE
DELETE
destroy

Forth 發表在 痞客邦 留言(0) 人氣()

在rails專案目錄中執行
ruby script/plugin install http://themidnightcoders.net:8089/svn/weborb
就會把WebORB安裝到vendor目錄。安裝程式會在config目錄中會建立WEB-INF/flex目錄,存放設定檔, 此外,還會安裝一個weborb_controller.rb到app/controller目錄,public目錄中會多一個examples目錄, 內有可以使用的範例。執行

Forth 發表在 痞客邦 留言(0) 人氣()

FreeBSD和OS X使用者可以下載wretch.rb,使用前需先安裝Ruby和mechanize;Windows使用者可以下載wretch.exe,下載後直接執行,不需要安裝其它程式。若在FreeBSD或OS X執行,被下載的相片會被儲存在「帳號/相簿編號_相簿名稱」目錄,在Windows則是儲存在「帳號/相簿編號」目錄。使用方法:
備份所有相簿: wretch 帳號 -a
備份指定相簿: wretch 帳號 相簿編號
備份多本相簿: wretch 帳號 相簿編號1 相簿編號2 相簿編號3 相簿編號N
備份有密碼的相簿: wretch -p 密碼 帳號 相簿編號

Forth 發表在 痞客邦 留言(0) 人氣()


下載並安裝MacPorts。
開一個terminal。
把/opt/local/bin和/opt/local/sbin加入PATH。
執行sudo port selfupdate。
執行sudo port install ruby。
執行sudo port install rb-rubygems。
執行sudo gem install rails -y。
執行sudo gem install mongrel -y。

Forth 發表在 痞客邦 留言(0) 人氣()

1 2
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。