Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Install ruby 1.9 on Windows using zip binary

Update:  This post is outdated. All in one installer for 1.9
is ready now, you should use it if you need 1.9 on windows. Get it here
http://rubyforge.org/frs/?group_id=167
Ruby has “all-in-one” installer for Windows, but it is outdated. As
of May 2009, Ruby 1.9.1 is released, the installer is still 1.8.6. If
you want the latest version, you need the zip package. But the zip
package is missing zlib.dll, libeay32.dll, ssleay32.dll and readline.dll
. Here is how to install it on windows.
Download the file
First you download the 1.9 package from http://www.ruby-lang.org/en/downloads/
Choose “Ruby 1.9 xxx binary” instead of “Ruby xxx Installer”.
Install it
Just Unpack the zip to c:\ruby.
Then add c:\ruby\bin to windows PATH.
Open a windows command console and type
gem update --system
Oops, it is broken! The binary is missing some dll files.
Let us fix it
zlib
Download zlib windows binary from
http://gnuwin32.sourceforge.net/packages/zlib.htm
unzip the package, then find a file named “zlib1.dll”.
Copy “zlib1.dll” to your ruby\bin directory AND rename it to zlib.dll
What the heck?! Why renaming it? Because ruby source code reference the
dll as zlib.dll. It is common to use alias like this on Linux. Ruby
source was coded on Linux.
openssl
Download openssl windows binary from
http://gnuwin32.sourceforge.net/packages/openssl.htm
Unzip it.
Find “libeay32.dll”, copy to ruby\bin. Don’t rename it.
Find “libssl32.dll”, copy to ruby\bin and rename it to ssleay32.dll
readline
Download readline windows binary from
http://gnuwin32.sourceforge.net/packages/readline.htm
Unzip it.
Find “readline5.dll”, copy to ruby\bin and rename it to readline.dll
Done
That is all. Now type
gem update --system
then
gem install rails


Ïà¹ØÎĵµ£º

ʹÓÃrubyÓëMS AccessÊý¾Ý¿â½»»¥

ruby³£¹æ·ÃÎÊaccessÊý¾Ý¿âµÄ·½·¨Ó¦¸ÃÊÇʹÓÃDBI¿â
£º
require 'dbi'

DBI.connect("DBI:ADO:Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db.mdb;")

¿ÉÊÇ
¼òµ¥³¢ÊÔÖ®ºóûÄܳɹ¦£¬ÌáʾÕÒ²»µ½Çý¶¯Æ÷ADO,ÀÁµÃÔÙÊÔ£¬ËìÕÒÆäËû·½·¨¡£
Ò»·¬ËÑË÷Ö®ºó£¬·¢ÏÖ¿ÉÒÔÓÃWIN32OLEÀ´·ÃÎÊaccess,дһ¸ö¼òµ¥µÄÀà°ü×°Ö®: ......

RubyϽâ¾öoci8°²×°´íÎóµÄÎÊÌâ

Prepare
1. Download 'OCI 1.x.x.rb' (it's VERY important - execution MUST be *.rb)
2. Download 'oci8lib.so'
Install
1. Copy 'OCI8.rb' to .../ruby/lib/ruby/site_ruby/1.8/DBD/OCI8
2. Copy 'oci8.rb' to .../ruby/lib/ruby/site_ruby/1.8
3. Copy 'oci8lib.so' to .../ruby/lib/ruby/site_ruby/1.8/i386-msv ......

RUBYʵ¼ù—Ruby ReportÖ®Ruport¼òµ¥Ó¦ÓÃ

Ruport¹Ù·½ÍøÕ¾£ºhttp://www.rubyreports.org/
±¾ÀýÖн«½éÉÜRuby±¨±íµÄ¼òµ¥¿ª·¢
¿ª·¢»·¾³
OS:WindowsXP
Ruby:Ruby1.8.7
Rails:Rails2.3.5
Mysql:Mysql5.0.9
IDE:Rubymine2.0.1
Ò»¡¢°²×°gem
°²×°ÃüÁî
gem install ruport
gem install ruport-util
gem install acts_as_reportable
¶þ¡¢´´½¨Êý¾Ý¿â
  datab ......

Ruby Ruportʵ¼ù—ÖÐÎÄPDF±¨±íÖ®FPDF

RuportÖÐpdf_writer¶ÔÖÐÎĵÄÖ§³Ö²¢²»ºÃ£¬Êä³öµÄÖÐÎÄÏÔʾµÄÊÇÂÒÂë¡£ÉÏÍø²éÁ˺ܶà×ÊÁÏ£¬Ò²Ã»ÓÐÕÒµ½ºÃµÄ½â¾ö·½°¸£¬ÎÞÄÎÖ»ºÃ²é¿´Ô´´úÂ룬µ½µ×ΪʲôRuport×Ô´øµÄPDF¹¤¾ß²»Ö§³ÖÖÐÎÄÊä³ö¡£
Ruport::Formatter::PDF::WriterÖÐÕÒµ½ÒÔÏ´úÂë
   metrics = load_font_metrics(font)
   metrics = PDF::Writer: ......

Ruby Ruportʵ¼ù—ÖÐÎÄPDF±¨±íÖ®PRAWN

FPDFÄÜÖ§³ÖPDFµÄÖÐÎÄ´òÓ¡£¬È»¶øÈ´´æÔÚ²»ÉٵIJ»ÈçÒâÖ®´¦£¬¾ÝÎÒÄ¿Ç°µÄʹÓã¬×ܽá³ö¼¸µã£º
1£©FPDFÌṩµÄPdf_Chinese×ÖÌ壬½«GBÕâÖÖ×ÖÌåдÈëÁË´úÂëÖУ¬ÈôÎÒÃÇÏ£ÍûÒýÈëÆäËûµÄÖÐÎÄ×ÖÌ壬Ôò²»ÄÜ·½±ãµØʹÓÃ
2£©FPDFÊä³öµÄÊý×Ö²¢²»ÃÀ¹Û£¬²»ÈçRuport::Formatter::PDF×Ô´øµÄ×ÖÌå
3£©FPDFÌṩµÄ·½·¨²¢²»¶à£¬¶ÔÓÚÒ»°ãµÄ±¨±í´òÓ¡£¬Óõ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ