Enviar búsqueda
Cargar
Web技術勉強会 第19回
•
1 recomendación
•
1,041 vistas
龍一 田中
Seguir
Web技術勉強会 第19回
Leer menos
Leer más
Tecnología
Denunciar
Compartir
Denunciar
Compartir
1 de 17
Descargar ahora
Descargar para leer sin conexión
Recomendados
Rubykaigi2008: REST 信者から見た Ruby と Rails
Rubykaigi2008: REST 信者から見た Ruby と Rails
Yohei Yamamoto
Revisited
Revisited
Shunsaku Kudo
Ruby on Rails in UbiSunrise
Ruby on Rails in UbiSunrise
Wisely chen
SPI server centric SEO compatible stateless web sites... ALLELUIA!
SPI server centric SEO compatible stateless web sites... ALLELUIA!
Jose María Arranz
Garfield hs ap cs 2009 - intarwebs
Garfield hs ap cs 2009 - intarwebs
Hélène Martin
How to configure with Spring an api not based on Spring
How to configure with Spring an api not based on Spring
Jose María Arranz
Web技術勉強会 第26回
Web技術勉強会 第26回
龍一 田中
Web技術勉強会6回目
Web技術勉強会6回目
龍一 田中
Recomendados
Rubykaigi2008: REST 信者から見た Ruby と Rails
Rubykaigi2008: REST 信者から見た Ruby と Rails
Yohei Yamamoto
Revisited
Revisited
Shunsaku Kudo
Ruby on Rails in UbiSunrise
Ruby on Rails in UbiSunrise
Wisely chen
SPI server centric SEO compatible stateless web sites... ALLELUIA!
SPI server centric SEO compatible stateless web sites... ALLELUIA!
Jose María Arranz
Garfield hs ap cs 2009 - intarwebs
Garfield hs ap cs 2009 - intarwebs
Hélène Martin
How to configure with Spring an api not based on Spring
How to configure with Spring an api not based on Spring
Jose María Arranz
Web技術勉強会 第26回
Web技術勉強会 第26回
龍一 田中
Web技術勉強会6回目
Web技術勉強会6回目
龍一 田中
Web技術勉強会 20110514
Web技術勉強会 20110514
龍一 田中
Web技術勉強会 20100424
Web技術勉強会 20100424
龍一 田中
Web技術勉強会12回目
Web技術勉強会12回目
龍一 田中
Web技術勉強会9回目2(Slideshare用)
Web技術勉強会9回目2(Slideshare用)
龍一 田中
Web技術勉強会 第29回
Web技術勉強会 第29回
龍一 田中
Test Driven Development and Quality Improvement
Test Driven Development and Quality Improvement
Carlos Solís
Web技術勉強会10回目(Slideshare用)
Web技術勉強会10回目(Slideshare用)
龍一 田中
Web技術勉強会 第25回
Web技術勉強会 第25回
龍一 田中
Web技術勉強会9回目(Slideshare用)
Web技術勉強会9回目(Slideshare用)
龍一 田中
Web技術勉強会 第33回
Web技術勉強会 第33回
龍一 田中
Web技術勉強会 20110723
Web技術勉強会 20110723
龍一 田中
Web技術勉強会 20100925
Web技術勉強会 20100925
龍一 田中
Web技術勉強会 第28回
Web技術勉強会 第28回
龍一 田中
Web技術勉強会6回目
Web技術勉強会6回目
龍一 田中
Web技術勉強会 第34回
Web技術勉強会 第34回
龍一 田中
WebSocketでリアルタイム処理をする
WebSocketでリアルタイム処理をする
龍一 田中
Working With Rails
Working With Rails
Dali Wang
20090418 イケテルRails勉強会 第1部Rails編
20090418 イケテルRails勉強会 第1部Rails編
mochiko AsTech
Ruby on Rails Tutorial Part I
Ruby on Rails Tutorial Part I
Wei Jen Lu
Ruby on Rails 2.1 What's New Chinese Version
Ruby on Rails 2.1 What's New Chinese Version
Libin Pan
Chinaonrails Rubyonrails21 Zh
Chinaonrails Rubyonrails21 Zh
Jesse Cai
Rails Cache
Rails Cache
wear
Más contenido relacionado
Destacado
Web技術勉強会 20110514
Web技術勉強会 20110514
龍一 田中
Web技術勉強会 20100424
Web技術勉強会 20100424
龍一 田中
Web技術勉強会12回目
Web技術勉強会12回目
龍一 田中
Web技術勉強会9回目2(Slideshare用)
Web技術勉強会9回目2(Slideshare用)
龍一 田中
Web技術勉強会 第29回
Web技術勉強会 第29回
龍一 田中
Test Driven Development and Quality Improvement
Test Driven Development and Quality Improvement
Carlos Solís
Web技術勉強会10回目(Slideshare用)
Web技術勉強会10回目(Slideshare用)
龍一 田中
Web技術勉強会 第25回
Web技術勉強会 第25回
龍一 田中
Web技術勉強会9回目(Slideshare用)
Web技術勉強会9回目(Slideshare用)
龍一 田中
Web技術勉強会 第33回
Web技術勉強会 第33回
龍一 田中
Web技術勉強会 20110723
Web技術勉強会 20110723
龍一 田中
Web技術勉強会 20100925
Web技術勉強会 20100925
龍一 田中
Web技術勉強会 第28回
Web技術勉強会 第28回
龍一 田中
Web技術勉強会6回目
Web技術勉強会6回目
龍一 田中
Web技術勉強会 第34回
Web技術勉強会 第34回
龍一 田中
WebSocketでリアルタイム処理をする
WebSocketでリアルタイム処理をする
龍一 田中
Destacado
(16)
Web技術勉強会 20110514
Web技術勉強会 20110514
Web技術勉強会 20100424
Web技術勉強会 20100424
Web技術勉強会12回目
Web技術勉強会12回目
Web技術勉強会9回目2(Slideshare用)
Web技術勉強会9回目2(Slideshare用)
Web技術勉強会 第29回
Web技術勉強会 第29回
Test Driven Development and Quality Improvement
Test Driven Development and Quality Improvement
Web技術勉強会10回目(Slideshare用)
Web技術勉強会10回目(Slideshare用)
Web技術勉強会 第25回
Web技術勉強会 第25回
Web技術勉強会9回目(Slideshare用)
Web技術勉強会9回目(Slideshare用)
Web技術勉強会 第33回
Web技術勉強会 第33回
Web技術勉強会 20110723
Web技術勉強会 20110723
Web技術勉強会 20100925
Web技術勉強会 20100925
Web技術勉強会 第28回
Web技術勉強会 第28回
Web技術勉強会6回目
Web技術勉強会6回目
Web技術勉強会 第34回
Web技術勉強会 第34回
WebSocketでリアルタイム処理をする
WebSocketでリアルタイム処理をする
Similar a Web技術勉強会 第19回
Working With Rails
Working With Rails
Dali Wang
20090418 イケテルRails勉強会 第1部Rails編
20090418 イケテルRails勉強会 第1部Rails編
mochiko AsTech
Ruby on Rails Tutorial Part I
Ruby on Rails Tutorial Part I
Wei Jen Lu
Ruby on Rails 2.1 What's New Chinese Version
Ruby on Rails 2.1 What's New Chinese Version
Libin Pan
Chinaonrails Rubyonrails21 Zh
Chinaonrails Rubyonrails21 Zh
Jesse Cai
Rails Cache
Rails Cache
wear
Gorm @ gopher china
Gorm @ gopher china
Jinzhu
rails-footnotes
rails-footnotes
Shin-ichiro OGAWA
フラクタリスト技術知識共有会発表資料 090903
フラクタリスト技術知識共有会発表資料 090903
ngi group.
Reification
Reification
Shunsaku Kudo
XS Japan 2008 Xen Mgmt Japanese
XS Japan 2008 Xen Mgmt Japanese
The Linux Foundation
Understanding Web Services
Understanding Web Services
aru85
Understanding Web Services
Understanding Web Services
aru85
yusukebe in Yokohama.pm 090909
yusukebe in Yokohama.pm 090909
Yusuke Wada
When To Use Ruby On Rails
When To Use Ruby On Rails
dosire
Rails Deployment with NginX
Rails Deployment with NginX
Stoyan Zhekov
企业级搜索引擎Solr交流
企业级搜索引擎Solr交流
chuan liang
20090323 Phpstudy
20090323 Phpstudy
Yusuke Ando
オブジェクト指向スクリプト言語 Ruby
オブジェクト指向スクリプト言語 Ruby
Kitajiro Kitayama
1242626441API2 upload
1242626441API2 upload
51 lecture
Similar a Web技術勉強会 第19回
(20)
Working With Rails
Working With Rails
20090418 イケテルRails勉強会 第1部Rails編
20090418 イケテルRails勉強会 第1部Rails編
Ruby on Rails Tutorial Part I
Ruby on Rails Tutorial Part I
Ruby on Rails 2.1 What's New Chinese Version
Ruby on Rails 2.1 What's New Chinese Version
Chinaonrails Rubyonrails21 Zh
Chinaonrails Rubyonrails21 Zh
Rails Cache
Rails Cache
Gorm @ gopher china
Gorm @ gopher china
rails-footnotes
rails-footnotes
フラクタリスト技術知識共有会発表資料 090903
フラクタリスト技術知識共有会発表資料 090903
Reification
Reification
XS Japan 2008 Xen Mgmt Japanese
XS Japan 2008 Xen Mgmt Japanese
Understanding Web Services
Understanding Web Services
Understanding Web Services
Understanding Web Services
yusukebe in Yokohama.pm 090909
yusukebe in Yokohama.pm 090909
When To Use Ruby On Rails
When To Use Ruby On Rails
Rails Deployment with NginX
Rails Deployment with NginX
企业级搜索引擎Solr交流
企业级搜索引擎Solr交流
20090323 Phpstudy
20090323 Phpstudy
オブジェクト指向スクリプト言語 Ruby
オブジェクト指向スクリプト言語 Ruby
1242626441API2 upload
1242626441API2 upload
Más de 龍一 田中
Web技術勉強会 20130525 - Google Cloud Messaging入門
Web技術勉強会 20130525 - Google Cloud Messaging入門
龍一 田中
Web技術勉強会 20120728
Web技術勉強会 20120728
龍一 田中
Web技術勉強会 20120609
Web技術勉強会 20120609
龍一 田中
Web技術勉強会 20120114 - JenkinsでJava/PHP/Ruby/JavaScriptをビルドする
Web技術勉強会 20120114 - JenkinsでJava/PHP/Ruby/JavaScriptをビルドする
龍一 田中
Web技術勉強会 20111112
Web技術勉強会 20111112
龍一 田中
Web技術勉強会 20110611
Web技術勉強会 20110611
龍一 田中
Web技術勉強会 20110528
Web技術勉強会 20110528
龍一 田中
Web技術勉強会 第38回
Web技術勉強会 第38回
龍一 田中
Web技術勉強会 第37回
Web技術勉強会 第37回
龍一 田中
Web技術勉強会 第31回
Web技術勉強会 第31回
龍一 田中
Web技術勉強会 第30回
Web技術勉強会 第30回
龍一 田中
Web技術勉強会23回目
Web技術勉強会23回目
龍一 田中
Web技術勉強会 第18回
Web技術勉強会 第18回
龍一 田中
Web技術勉強会11回目
Web技術勉強会11回目
龍一 田中
Más de 龍一 田中
(14)
Web技術勉強会 20130525 - Google Cloud Messaging入門
Web技術勉強会 20130525 - Google Cloud Messaging入門
Web技術勉強会 20120728
Web技術勉強会 20120728
Web技術勉強会 20120609
Web技術勉強会 20120609
Web技術勉強会 20120114 - JenkinsでJava/PHP/Ruby/JavaScriptをビルドする
Web技術勉強会 20120114 - JenkinsでJava/PHP/Ruby/JavaScriptをビルドする
Web技術勉強会 20111112
Web技術勉強会 20111112
Web技術勉強会 20110611
Web技術勉強会 20110611
Web技術勉強会 20110528
Web技術勉強会 20110528
Web技術勉強会 第38回
Web技術勉強会 第38回
Web技術勉強会 第37回
Web技術勉強会 第37回
Web技術勉強会 第31回
Web技術勉強会 第31回
Web技術勉強会 第30回
Web技術勉強会 第30回
Web技術勉強会23回目
Web技術勉強会23回目
Web技術勉強会 第18回
Web技術勉強会 第18回
Web技術勉強会11回目
Web技術勉強会11回目
Último
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
naman860154
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Results
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Allon Mureinik
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Pooja Nehwal
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
gurkirankumar98700
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Delhi Call girls
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Martijn de Jong
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Enterprise Knowledge
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
Paola De la Torre
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
wesley chun
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Maria Levchenko
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Michael W. Hawkins
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Katpro Technologies
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
Último
(20)
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
Web技術勉強会 第19回
1.
Web技術勉強会 第19回
~Ruby on RailsのApache連携~ 2009/04/11 Ryuichi Tanaka http://blog.livedoor.jp/mapserver2007/ 1
2.
今回の目標 Ruby on Railsをサーバで動かす
Ruby on Railsのインストール mongrelの設定 Apacheとの連携 RadRailsで作成したRailsアプリのデプロイ 2
3.
Rubyインストール Ruby1.8.7をインストール Ruby1.9はgemのプラグインが対応していないものが 多いのでパス
ソースからインストール Gemをインストール ruby setup.rb apt-getでのインストールは正常に動かないので非推 奨 3
4.
Railsインストール gemでインストール クライアントの開発環境のRailsとバージョンをあわせ る必要がある(2.2.xと2.3.xでは互換性がない)
バージョンを指定してインストール ىgem install rails -v 2.2.2 4
5.
mongrelインストール mongrel Railsが動作するアプリケーションサーバ。WEBrickよりも初回起
動時の速度が速い。最近ではWEBrickより使われている。 RadRailsもmongrelに対応している。 gem install mongrel mongrelの問題点 単一プロセスに単一のインスタンスを生成して占有する。負荷分 散の点で問題あり。 コンソール上で起動させると、「Ctrl+C」を押すまで他の入力を受 け付けない。 5
6.
mongrel_clusterインストール mongrel単体の問題を解決できる 複数のmongrelを起動し、ロードバランサを使うことで負荷分散が 可能
コンソールが入力を受け付ける mongrel_clusterインストール・設定 gem install mongrel_cluster mongrel_rails cluster::configureで設定ファイル作成 mongrel_rails cluster::startで起動 mongrel_rails cluster::stopで停止 6
7.
ここからが本題 ApacheからRailsプロジェクトを認識させたい RailsはApacheでは動作しない かといって、mongrelだけで動かすのは…。
Apacheとmongrelを連携 または ApacheからRailsを認識させる必要あり 7
8.
連携方法1 Apache+mongrel_cluster+Pound Poundを利用してリバースプロキシ
ىフロントエンドにPoundがいて、バックエンドのApache、mongrelに振 り分け ىpound.cfgのプロキシルールによって振り分け PHP Apache Port:81 Perl Client Pound Port:80 mongrel Rails pound.cfg Port:3000 8
9.
連携方法2 Apache+Passenger(mod_rails) ApacheのRails拡張モジュール
ىmongrelなどのアプリケーションサーバが不要で、振り分けの 必要がない Apache Rails Client httpd.conf Port:80 PHP/Perl 9
10.
連携方法3 Apache+mongrel_cluster+mod_proxy Apacheモジュールのmod_proxy
ىフロンエンドがApache、バックエンドがmongrel ى振り分けはApacheが行う Apache mongrel Client Port:3000 Rails httpd.conf Port:80 PHP Perl 10
11.
連携方法の比較
連携1 連携2 連携3 導入のしやすさ △ ○ △ パフォーマンス ○ ○ ○ ・Railsを動作させる環境構築方法はいくつもあるが、上記の場合はどれも コスト面で変わらない。 ・Rails(Ruby)を動かす環境としてCGI以外なら大抵OK。 ・連携3は、Apache2.2系にすることがお勧め。mod_proxy_balancerを使えば、 連携1同様バランシングができる。 ※連携1:Apache+mongrel_cluster+Pound ※連携2:Apache+Passenger(mod_rails) ※連携3:Apache+mongrel_cluster+mod_proxy 11
12.
採用したのは連携3 連携1、連携2はうまくいかなかった 連携1:192.168.0.103:3000へ振り分ける設定 をしたが、なぜかForbiddenになる。
連携2:Railsのpublicは見れるが、肝心のRails プロジェクトへたどり着けず、Forbiddenになる。 ただし連携3もベストじゃない mongrel_clusterを活かすには mod_proxy_balancerにしたほうがいい。 12
13.
RadRailsで作成したRailsアプリのデプロイ 基本的にコピーでOK ただしRailsのバージョンが一致していること 開発方法 RadRails上で開発、動作確認
データベースはサーバ上に直接問い合わせる production,development,testの3パターンがあ るが、一人で開発する分にははじめから prodcutionで問題ない 13
14.
Railsの構成はPHPやPerlとは違う Apache+PHP/Perlの場合
/var/www or /usr/local/apache2/htdocs http://mydomain.jp/sample.php sample.php Client sample.pl http://mydomain.jp/sample.pl ドキュメントルートからの相対パスでファイルを実行する 14
15.
Railsの構成はPHPやPerlとは違う mongrel+Railsの場合
RAILS_ROOT /app/controllers /app/views http://mydomain.jp:3000 Client routes.rb images javascripts index.html stylesheets /public routes.rbのルールに従ってcontrollerのactionを実行 15
16.
RailsとPHP/Perlの共存は注意が必要 Railsは構成がまったく異なる Railsはデフォルトでは 「RAILS_ROOT/public/index.html」を読みにいく。
routes.rbを設定することで 「RAILS_ROOT/app/controllers」のメソッド(action)を実 行する。 Apacheで動かすアプリの感覚でRailsを動かそうとする とうまくいかない(RailsはApacheではなく、mongrelなの で当然)。 16
17.
今後の予定 Railsアプリ開発 Railsのルールを理解する必要がある
ىデータベースを使ってみる(Model) ىORM(ActiveRecode)を理解する(Model) 基礎Ruby on Rails ىRubyの構文を覚える たのしいRuby ىRails標準のメソッドを覚える Railsレシピブック 17
Descargar ahora