Ruby on Rails 2.02 在Windows平台上的安裝筆記

最近看了一下Ruby on Rails的網頁開發技術,還蠻有趣的...也很可怕
RoR 2.02(2007/12/18會傳回403 Forbidden)剛剛出來,很難直接由網路安裝,相信過一陣子之後,應該可以直接安裝。以下是個人在Windows XP上的安裝。


actionmailer-2.0.2.gem
actionmailer-2.0.2.zip
actionpack-2.0.2.gem
actionpack-2.0.2.zip
activerecord-2.0.2.gem
activerecord-2.0.2.zip
activeresource-2.0.2.gem
activeresource-2.0.2.zip
activesupport-2.0.2.gem
activesupport-2.0.2.zip
rails-2.0.2.gem
rails-2.0.2.zip
win32-service-0.6.0-x86-mswin32-60.gem
win32-service-0.6.0.zip
  • 依序安裝Gems,以便裝好Rails,Mongrel和mysql相關的library:

E:\RoR>gem install activesupport-2.0.2.gem
Successfully installed activesupport, version 2.0.2
Installing ri documentation for activesupport-2.0.2-...
Installing RDoc documentation for activesupport-2.0.2-...

E:\RoR>gem install activerecord-2.0.2.gem
Successfully installed activerecord, version 2.0.2
Installing ri documentation for activerecord-2.0.2-...
Installing RDoc documentation for activerecord-2.0.2-...

E:\RoR>gem install actionpack-2.0.2.gem
Successfully installed actionpack, version 2.0.2
Installing ri documentation for actionpack-2.0.2...
Installing RDoc documentation for actionpack-2.0.2...

E:\RoR>gem install actionmailer-2.0.2.gem
Successfully installed actionmailer, version 2.0.2
Installing ri documentation for actionmailer-2.0.2...
Installing RDoc documentation for actionmailer-2.0.2...

E:\RoR>gem install activeresource-2.0.2.gem
Successfully installed activeresource, version 2.0.2
Installing ri documentation for activeresource-2.0.2-...
Installing RDoc documentation for activeresource-2.0.2-...

E:\RoR>gem install rails-2.0.2.gem
Successfully installed rails, version 2.0.2

E:\RoR>rails -v
Rails 2.0.2

E:\RoR>gem install win32-service
Select which gem to install for your platform (i386-mswin32)
1. win32-service 0.6.0 (ruby)
2. win32-service 0.5.2 (ruby)
3. win32-service 0.5.2 (mswin32)
4. Skip this gem
5. Cancel installation
> 3
Successfully installed win32-service-0.5.2-mswin32
Installing ri documentation for win32-service-0.5.2-mswin32...
Installing RDoc documentation for win32-service-0.5.2-mswin32...

E:\RoR>

E:\RoR>gem install mongrel_service -y
Select which gem to install for your platform (i386-mswin32)
1. mongrel_service 0.3.3 (mswin32)
2. mongrel_service 0.3.2 (mswin32)
3. mongrel_service 0.3.1 (mswin32)
4. mongrel_service 0.1 (ruby)
5. Skip this gem
6. Cancel installation
> 1
Select which gem to install for your platform (i386-mswin32)
1. mongrel 1.1.2 (ruby)
2. mongrel 1.1.2 (mswin32)
3. mongrel 1.1.1 (jruby)
4. mongrel 1.1.1 (ruby)
5. mongrel 1.1.1 (mswin32)
6. Skip this gem
7. Cancel installation
> 2
Successfully installed mongrel_service-0.3.3-mswin32
Successfully installed gem_plugin-0.2.3
Successfully installed mongrel-1.1.2-mswin32
Successfully installed cgi_multipart_eof_fix-2.5.0
Installing ri documentation for mongrel_service-0.3.3-mswin32...
Installing ri documentation for gem_plugin-0.2.3...
Installing ri documentation for mongrel-1.1.2-mswin32...
Installing ri documentation for cgi_multipart_eof_fix-2.5.0...
Installing RDoc documentation for mongrel_service-0.3.3-mswin32...
Installing RDoc documentation for gem_plugin-0.2.3...
Installing RDoc documentation for mongrel-1.1.2-mswin32...
Installing RDoc documentation for cgi_multipart_eof_fix-2.5.0...

E:\RoR>mongrel_rails help
Usage: mongrel_rails [options]
Available commands are:

- restart
- start
- stop
- service::install
- service::remove

Each command takes -h as an option to get help.

E:\RoR>gem install win32-service-0.6.0-x86-mswin32-60.gem
Successfully installed win32-service, version 0.6.0
Installing ri documentation for win32-service-0.6.0-current...
Installing RDoc documentation for win32-service-0.6.0-current...

E:\RoR>gem list --local

*** LOCAL GEMS ***

actionmailer (2.0.2, 1.3.6)
Service layer for easy email delivery and testing.

actionpack (2.0.2, 1.13.6)
Web-flow and rendering framework putting the VC in MVC.

actionwebservice (1.2.6)
Web service support for Action Pack.

activerecord (2.0.2, 1.15.6)
Implements the ActiveRecord pattern for ORM.

activeresource (2.0.2)
Think Active Record for web resources.

activesupport (2.0.2, 1.4.4)
Support and utility classes used by the Rails framework.

cgi_multipart_eof_fix (2.5.0)
Fix an exploitable bug in CGI multipart parsing.

fxri (0.3.6)
Graphical interface to the RI documentation, with search engine.

fxruby (1.6.13, 1.6.12)
FXRuby is the Ruby binding to the FOX GUI toolkit.

gem_plugin (0.2.3)
A plugin system based on rubygems that uses dependencies only

hpricot (0.6)
a swift, liberal HTML parser with a fantastic library

log4r (1.0.5)
Log4r is a comprehensive and flexible logging library for Ruby.

mongrel (1.1.2)
A small fast HTTP library and server that runs Rails, Camping, Nitro
and Iowa apps.

mongrel_service (0.3.3)
Mongrel Native Win32 Service Plugin for Rails (debug build)

rails (2.0.2, 1.2.6)
Web-application framework with template engine, control-flow layer,
and ORM.

rake (0.7.3)
Ruby based make-like utility.

sources (0.0.1)
This package provides download sources for remote gem installation

win32-api (1.0.4)
A superior replacement for Win32API

win32-clipboard (0.4.3)
A package for interacting with the Windows clipboard

win32-dir (0.3.2)
Extra constants and methods for the Dir class on Windows.

win32-eventlog (0.4.7, 0.4.6)
Interface for the MS Windows Event Log.

win32-file (0.5.4, 0.5.2)
Extra or redefined methods for the File class on Windows.

win32-file-stat (1.2.7)
A File::Stat class tailored to MS Windows

win32-process (0.5.5, 0.5.3)
Adds create, fork, wait, wait2, waitpid, and a special kill method

win32-sapi (0.1.4)
An interface to the MS SAPI (Sound API) library.

win32-service (0.6.0, 0.5.2)
An library for controlling and creating MS Windows services

win32-sound (0.4.1)
A library for playing with sound on MS Windows.

windows-api (0.2.0)
An easier way to create methods using Win32API

windows-pr (0.7.4, 0.7.2)
Windows functions and constants bundled via Win32::API

E:\RoR>gem install mysql
Select which gem to install for your platform (i386-mswin32)
1. mysql 2.7.3 (mswin32)
2. mysql 2.7.1 (mswin32)
3. mysql 2.7 (ruby)
4. mysql 2.6 (ruby)
5. Skip this gem
6. Cancel installation
> 1
Successfully installed mysql-2.7.3-mswin32
Installing ri documentation for mysql-2.7.3-mswin32...
Installing RDoc documentation for mysql-2.7.3-mswin32...
While generating documentation for mysql-2.7.3-mswin32
... MESSAGE: Unhandled special: Special: type=17, text=""
... RDOC args: --op E:/ruby/lib/ruby/gems/1.8/doc/mysql-2.7.3-mswin32/rdoc --exc
lude ext --main README --quiet ext README docs/README.html
(continuing with the rest of the installation)
  • 最後,下載MySQL 4,1或5.0以上的版本並安裝就大功告成


正常的Rail裝法應該是...
gem install rails -y
就行了!
不過2.02
(2007/12/18)才剛剛出來,在source server找不到,這樣裝會有問題。

留言

這個網誌中的熱門文章

Google瀏覽器發生「錯誤107 (net::ERR_SSL_PROTOCOL_ERROR): SSL 通訊協定錯誤」的解決方式

Cacti 簡單自製圖表詳解