#title(WindowsRuby2.0Ruby on Rails4.0Ƥߤ)

Windows7Ruby2.0Ruby on Rails4.0Ƥߤޤ

ʤꥶåȤǤåץǡȤƤꤴʾWebˤʤäΤǡƤޤ

(ʲ̵ݾڡ2013-11)

#contents

ñʼȤƤϡRuby 󥹥ȡ for WindowsǤˡ

RailsInstallerhttp://www.forest.impress.co.jp/docs/review/20120418_526822.htmlˤǤˡä

ԤΤۤñץ륢ץդƤ롣

ɡRailsInstallerǤȥС󤬸ŤΤȡgemΥɤɤߤäΤǡԤǤäƤߤ

* Ruby󥹥ȡƳ [#g7ba8ce7]
+http://rubyinstaller.org/ 
+rubyinstaller-2.0.0-pXXX.exe
+ɥե¹

󥹥ȡϡC:\Ruby200ȤƤߤ
ǡRubyƳơRubyޥɥץץȤ顢Ȥ褦ˤʤä

*gemΥåץǡ [#u7587348]

+RubyޥɥץץȤư
+gem update --system

*DevKitƳ [#i5836fbb]

󥹥ȡϡC:\Ruby200\devkit Ȥ

+ʬWindows32bitǤ64bitǤǧƤ http://support.microsoft.com/kb/958406/ja
+١http://rubyinstaller.org/
+Development Kitɡ32bitRuby 2.064bitRuby 2.0
+ɤDevKitե¹ԡ󥹥ȡϡc:\Ruby200\devkit
+RubyޥɥץץȤǡDevKitΥ󥹥ȡ˰ư cd c:\Ruby200\devkit
+ruby dk.rb init
+ruby dk.rb install

* gemSSL顼 [#s1b5fae0]

ΤȡĤRubyѥå򥤥󥹥ȡ/åץǡȤȤgemSSL顼Ф礬롣

μDz򤹤롣

+ʲΥc:\Ruby200\cacert.pemפȤ¸
--http://curl.haxx.se/ca/cacert.pem
+RubyޥɥץץȤǡsetx SSL_CERT_FILE "C:\Ruby200\cacert.pem"פȤơĶѿ
+RubyޥɥץץȤƵư

*RailsƳ [#e7a0fd65]

äRailsƳȤޤ褿

⤷ȡĤפʼ礬뤫⡣

+gem update rake
+gem install rails --platform=ruby

(ʤ֤)

*ץκ [#p21e7a5d]

ѤˡSitesץեѰդơˡfooץץ

+cd \
+mkdir Sites
+cd Sites
+rails new foo --skip-bundle
+cd foo
+bundle install
+rails g scaffold user name:string email:string
+rake db:migrate

*ưǧ [#pf869c00]

+rails s
+Web֥饦ǡhttp://localhost:3000/users˥
+³ǤޤǤפȥ顼Ǥȡ̥ɥ"³ޤ"ȤǤOK
+Listing usersפȤФĥڡɽ줿顢New Userץ󥯤򥯥å
+Nameˤʤ̾EmailˤʤΥ᡼륢ɥ쥹ϤCreate Userץܥ򥯥å

ڡξˡUser was successfully created.פɽ OK

Ǵ

ץߤȤϡctrl-c

* [#s454f4af]

-[[Ruby on Rails 3.2  Windows ˥󥹥ȡ뤹򤫤ʤǫƤߤޤ - Rails  - Ruby on Rails with OIAX:http://www.oiax.jp/rails/zakkan/rails_3_1_installation_on_windows.html]]
-[[ϤƤRoR3ݡȥڡDevKitλȤ:http://supportdoc.net/support-ror3/devkit.html]]
-[[igaiga diary(2013-06-17)Windows  Ruby SSL򹹿:http://igarashikuniaki.net/diary/20130617.html]] SSL顼βˡ

-[[Ruby on Rails Guides in Japanese:http://yoshitetsu.rackbox.net/]]


ȥå   ʬ Хåå   ñ측 ǽ   إ   ǽRSS