deploying rails applications, the pragmatic programers (2008)

267 452 0
deploying rails applications, the pragmatic programers (2008)

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

[...]... application The environment, in this case, includes all the different components that an Internet application needs You’ll learn to build each of these pieces yourself or rely on another vendor to build those pieces for you Those pieces will include the operating system, the Ruby language, the Rails framework, and the various pieces that will tie them together The host represents where your customers will go... computer and not the server, the prompt will look like this: local$ 1.4 Acknowledgments Collectively We’d like to thank DHH and the Rails core team for giving us Rails, because none of this would have been possible without their innovations We’d also like to thank the Rails and the Ruby community 17 A CKNOWLEDGMENTS as a whole We send thanks to the Capistrano and Mongrel teams for advancing the early deployment... applications the same way, by clustering • You can even use some of the same servers, and the new ones work mostly like the old ones • You still keep your source code in source control • The operating system is still usually Unix-based For all the talk about the way your applications may change, deployment remains precisely the same Think of the Internet as a road map 11 T HE L AY OF THE L AND Host... Simple Rails Application I suggest you practice with an empty Rails project first Create the Rails application as usual:2 $ rails ~/deployit create create app/controllers At this point, you could do an svn import and put the whole directory tree in the repository I recommend against doing so If you use the “in-place import” procedure instead, you can selectively commit the pieces you want, not the whole... how to link to Edge Rails with an external link, how to generate code that’s automatically checked in, and how to do a few other tricks as well 29 S UBVERSION T IPS Running Edge Rails If you are like me, you enjoy keeping up with the latest changes in the Rails trunk or Edge Rails Get the latest and greatest features right as they are added by using svn:externals You can get Edge Rails to automatically... setting the vendor directory’s svn:externals property by running this command: $ svn propedit svn:externals vendor When your editor opens to allow you to set the svn:externals property, add this line: rails http://dev.rubyonrails.org/svn /rails/ trunk/ The next time you update,4 Subversion will download the entire Rails trunk directory to vendor /rails for you If you want to negate that option, you can use the. .. few conventions with the command-line prompts to make it easier to follow along On most Unix-like systems, when the command-line prompt is the number sign (#), it is letting you know that you are logged in as root When the prompt is the dollar sign ($), you are logged in as a regular system user These are the conventions for the Bourne Again Shell (bash) If you are running another shell, you might... Figure 1.1: Basic deployment map The buildings and places are servers, browsers on clients, routers, firewalls, and balancers The roads are the networks between them and the various communication protocols those networks use I like the map analogy because when all is said and done, the Internet is all about moving data from one place to another When you deploy, you’re using the Internet to move your application... you’ll want to use Subversion for your application’s source code control The majority of Rails developers use it, the Rails team uses it for Rails, and the Rails plug-in system also uses it Version Control with Subversion [PCSF04] is a great book about Subversion You should also check out Pragmatic Version Control [Mas05] for a pragmatic view of source code control in any language For this chapter,... installed and running Subversion on Rails The keys to using Subversion with Rails are maintaining the right structure You want to keep the right stuff under source control and keep the wrong stuff out Setting up your application’s repository right the first time will save you time and frustration A number of items in a Rails application do not belong in source control Many a new Rails developer has clobbered . on another vendor to build those pieces for you. Those pieces will include the operating system, the Ruby language, the Rails framework, and the various pieces that will tie them together. The. claim, the desi gnations have been printed in initia l capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf and the. this book is about the road that goes from the application on the client to the server. And I’ll start the book that way. The basic deploy- ment map (shown in Figure 1.1, on the previous page)

Ngày đăng: 29/04/2014, 14:42

Từ khóa liên quan

Mục lục

  • Contents

  • Introduction

    • The Lay of the Land

    • Finding a Home

    • Conventions

    • Acknowledgments

    • Refining Applications for Production

      • The Lay of the Land

      • Source Code Management

      • Subversion Tips

      • Stabilizing Your Applications

      • Active Record Migrations

      • Application Issues for Deployment

      • Shared Hosts

        • The Lay of the Land

        • Choosing a Shared Host

        • Setting Up Your Domain and DNS

        • Configuring Your Server

        • Server Setup: Create a Database

        • Installing Your Application

        • Configuring Your Web Server

        • Application Setup: Rails Config Files

        • The Well-Behaved Application

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan