How to deploy your Rails application on Windows

4,182 views
3,754 views

Published on

Ruby on Rails application deployment for Microsoft solutions is quite tough issue for rails developers, despite Helicon Zoo rising could solve that. However still no solution for early versions Windows OS, especially for the server older than IIS 7. This talk is regarding how to deploy rails application by setting IIS 6 as a reverse proxy server. Through handling requests and passing to rails server, the deployment for our rails application on Windows can be more easier with efficiency.

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,182
On SlideShare
0
From Embeds
0
Number of Embeds
33
Actions
Shares
0
Downloads
15
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

How to deploy your Rails application on Windows

  1. 1. RubyConf2014 LightningTalk Howto deployyour Rails application onWindows shesee
  2. 2. shesee Rails developer @ Taipei » Ruby Taiwan Community » Ruby Conf 2014 staff » Rails Girls Coach » Traffic-related engineering » 5xRuby Inc. » Optimis Corp.
  3. 3. Theysaid Rails hatesWindows
  4. 4. Theysaid Rails hatesWindows True story.
  5. 5. True stroy A rails application needs to be deployed on Windows server 2003
  6. 6. True stroy A rails application needs to be deployed on Windows server 2003 >> 2013.years - 2003.years => 10 years
  7. 7. Enviroment 10+years old machine » Windows server 2003 » IIS 6
  8. 8. There's PlanA Helicon Zoo A repository of web frameworks and applications for Microsoft IIS http://www.helicontech.com/zoo/
  9. 9. There's PlanA Helicon Zoo A repository of web frameworks and applications for Microsoft IIS Butnotforthe 10years oldWindows system
  10. 10. Plan B Setting Rails enviroment RailsInstaller(http://railsinstaller.org) It's simple and friendly for Microsoft users :)
  11. 11. Plan B Setting Rails enviroment There's a bisic rails application, you might need to be $ gem install bundler $ gem install rake $ bundle install $ rake assets:precompile etc...
  12. 12. Plan B gem 'thin' This is our rails application server, which actually response the request. $ thin --prefix=/yourapp -e production
  13. 13. Plan B Reverse proxyserver This is our plan: Make IIS 6 been a reverse proxy server !
  14. 14. Plan B Reverse proxyserver - IIS6with IIRF2.1 We need something to turn IIS6 to be a reverse proxy server IIRF 2.1 (http://iirf.codeplex.com/releases/view/58734)
  15. 15. Plan B Eastinstall Next, next and more next
  16. 16. Plan B Successful<3 Checkout ISAPI
  17. 17. Plan B Putitunder IIS 6 Put the "public" folder under IIS 6 [Setting its URI] And adding an IIRF.ini (config), it suppports regex
  18. 18. Plan B Putitunder IIS 6 Put the "public" folder under IIS 6 [Setting its URI] And adding an IIRF.ini (config), it suppports regex Example RewriteLog AppPathlogiirf.log ProxyPass ^/(.*)$ http://localhost:3000/$1 [I]
  19. 19. Plan B Howeveryou geta nackedwebsite Cause the URI path, asset pipeline can't be the default path now.
  20. 20. Plan B Howeveryou geta nackedwebsite Cause the URI path, asset pipeline can't be the default path now. Solution Also put the "assets" folder under IIS 6 Original: http://domain New: http://domain/URI
  21. 21. Plan B Reviewouraction 1.Install RubyInstaller
  22. 22. Plan B Reviewouraction 1.Install RubyInstaller 2.Install gem & bundler
  23. 23. Plan B Reviewouraction 1.Install RubyInstaller 2.Install gem & bundler 3.Install IIRF 2.1
  24. 24. Plan B Reviewouraction 1.Install RubyInstaller 2.Install gem & bundler 3.Install IIRF 2.1 4.Put on IIS
  25. 25. Plan B Reviewouraction 1.Install RubyInstaller 2.Install gem & bundler 3.Install IIRF 2.1 4.Put on IIS 5.Add public/iirf.ini
  26. 26. Youjustneedto click "next"
  27. 27. Thanks. Downloadthis slide http://carolHsu/rubyconf2014LT

×