Deployment


#1

So I’ve developed a rails app locally. Its awesome. It works great
and exactly how I want it to…but there is one problem…and its a
big one…

NOT ONE SITE SHOWS YOU STEP BY STEP INSTRUCTIONS FOR DEPLOYMENT

It just boggles my mind how rails is such an “awesome” and easy to use
framework yet deploying the app is more complicated than creating the
app. Why is this? Why isn’t it just a simple upload away from
working? AND why are there no STEP BY STEP instructions for making my
beatiful app work on my server???

Thanks


#2

NOT ONE SITE SHOWS YOU STEP BY STEP INSTRUCTIONS FOR DEPLOYMENT

Have you googled for “Capistrano rails” yet?

Many Rails ISPs have “how to” shingles out, for their

However, we agree that nothing inside Rails says “Capistrano”, so
there’s no
trail of breadcrumbs here…


Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!


#3

On Feb 25, 2007, at 7:29 PM, seanstewart wrote:

NOT ONE SITE SHOWS YOU STEP BY STEP INSTRUCTIONS FOR DEPLOYMENT

I’ve found a number of them. Every single one gives a different way,
every single one is not exactly what I need, and every single one is
rapidly out of date. Beyond that, every single one is specific to
the environment that the writer is deploying in to.

The short form is:

  • You should look in to capistrano for automated deployment. Yes,
    the manuals are down. Yes, they are in the wayback machine and the
    Google cache.

  • If you’re using a shared host then you’re likely getting apache 1.3
    with fcgi or apache 2.2 with balanced mod_proxy -> mongrel. If
    you’re using a VPS then people seem to favor the latter.

Get on the capistrano and rails-deployment mailing lists if need be.

-faisal


#4

Also, coming soon:

http://www.pragmaticprogrammer.com/titles/fr_deploy/index.html

-faisal


#5

Check out Capistrano if you need to deploy to multiple servers. Make
sure your host suports rails, rails setup in shared environments is
often site specific.

Check google, http://www.google.com/search?q=deploy+rails returs a few
thousand pages.


#6

eth1 wrote:

Check out Capistrano if you need to deploy to multiple servers.

And if you deploy to a single server.


Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!


#7

On 26 Feb 2007, at 16:35, Phlip wrote:

Check out Capistrano if you need to deploy to multiple servers.

And if you deploy to a single server.

Also use Capistrano if you want to make your life easier in the long
term :slight_smile: I didn’t use Capistrano with my first apps because i didn’t
feel the need to learn it at that time, that was a wrong decision :wink:

Best regards

Peter De Berdt


#8

Thank you to all who replied. You all suggested Capistrano which is
cool. However, that requires knowledge of SVN and creating
repositories and other stuff that I am supposed to know about how?
Its just so furstrating that there isn’t one tutorial that says it
all. It is like going to see a movie you waited to see for over a
year…and then the last five minutes of it cut out.

So I visited the amazing wiki on ror.org to find out more about this
subversion that is required with capistrano or whatever. I read:
HowtoUseRailsWithSubversion and think to myself, oh well this should
definitely help me out. (Please visit:
http://wiki.rubyonrails.org/rails/pages/HowtoUseRailsWithSubversion ).

The first sentence reads: “This assumes that you have already created
a subversion repository…”. So I say to myself, ok cool, I will
just google how to create this subversion supository crap. I search
“create SVN repository” which gives me back about 942,000 results.
AWESOME maybe I will be one step closer to launcing my rails app.
NOOOOOO - NOT ONE SITE on the first 20 pages helps. NOTHING. It is a
never ending cycle. The closer you get - the further you get. Why
the hell isn’t this as easy as uploading. I’ve spent more time trying
to figure out how to deploy than it takes me to develop my damn app.


#9

http://www.subversion.org gets you to Subversion’s home page.

As you move from building your app to deploying and maintaining it,
tools such as Subversion move from “Why would I even care about this?”
to “This could be useful” to “How did I live without it?” in a very
short period. If you’re not across Subversion (and/or similar
revision control tools), then it’s absolutely worth spending the time
to do so.

Furthermore, if you’re working in Windows with Subversion, you’ll
probably want to check out TortoiseSVN. Once you’ve got your
Subversion repository happening, TortoiseSVN hides all Subversion’s
complexity and lets you get on with doing your work.

With respect to Capistrano, it’s linked closely to Subversion because
the guy who originally developed it happened to use Subversion.

Regards

Dave M.


#10

I understand your frustration, that’s why I created a cap deploy how to,
I
found there were just steps missing that anyone new to rails /svn or
deployment in general would overlook

It took me a whole weekend to come to realize that cap wouldn’t work on
a
non-posix shell, but that’s not mentioned anywhere!

Amr M. cleaned up my how to and posted it here:

http://groups.google.com/group/capistrano/web/bare-bones-cap-howto

its barebones , but I hope it give you some initial understanding of how
this all works together

if you can get this far then the rest is , by comparision, easy

let me know if you get stuck on anything and ill add in the step that is
obviously missing


#11

Very few people doing modern MVC web development work without version
control these days, so you’re going to find little out there about
deploying Rails apps by FTP a file or a folder at a time, 1997
PHP-style.

Working with one set of files, occasionally backing it up by hand to a
zip, and copying things over by FTP is not just unwise, but mighty
tedious in the case of a modern MVC web app with its dozens of
directories and hundreds of files.

Crazy as it sounds, stop worrying about deployment for a day or two,
start using version control on a remote server (yours or some cheap
hosted Subversion service), and read up on Capistrano. It’ll even run
your migrations automatically every time you push out an update. Yum. :slight_smile:

seanstewart wrote:

Thank you to all who replied. You all suggested Capistrano which is
cool. However, that requires knowledge of SVN and creating
repositories and other stuff that I am supposed to know about how?
Its just so furstrating that there isn’t one tutorial that says it
all. It is like going to see a movie you waited to see for over a
year…and then the last five minutes of it cut out.

So I visited the amazing wiki on ror.org to find out more about this
subversion that is required with capistrano or whatever. I read:
HowtoUseRailsWithSubversion and think to myself, oh well this should
definitely help me out. (Please visit:
http://wiki.rubyonrails.org/rails/pages/HowtoUseRailsWithSubversion ).

The first sentence reads: “This assumes that you have already created
a subversion repository…”. So I say to myself, ok cool, I will
just google how to create this subversion supository crap. I search
“create SVN repository” which gives me back about 942,000 results.
AWESOME maybe I will be one step closer to launcing my rails app.
NOOOOOO - NOT ONE SITE on the first 20 pages helps. NOTHING. It is a
never ending cycle. The closer you get - the further you get. Why
the hell isn’t this as easy as uploading. I’ve spent more time trying
to figure out how to deploy than it takes me to develop my damn app.


#12

seanstewart wrote:

definitely help me out. (Please visit:
to figure out how to deploy than it takes me to develop my damn app.

Umm, I just posted this in response to another query… I’d recommend you
take a look at the guide that comes with the TortoiseSVN - it extracts
bits and pieces from the SVN Book but since it also talks about a
specific tool, it’s more tangible at parts and explains some of the
stuff that people take from granted when they write about SVN. For
example, you’ll find that everyone says that you use a structure like
trunk, branches and tags. But for an absolute newbie, it’s a bit
confusing about what you have to do to create the initial repository
layout. By chance or design, the TortoiseSVN guid discusses it :slight_smile:

FWIW, It’s quick to read through also… you can relatively quickly
learn enough to start using SVN on a daily basis (and it’s really easy
to use TortoiseSVN if you’re on Windows) and benefit from it - at some
later point, you’ll need to read more to understand some of the more
advanced features.

Someone (rubaidah.com ??) also has a script that does the job of
creating a basic layout of a Rails project in Subversion when you want
to create a new project. Sorry, I don’t have the link at hand, but I’m
sure you should be able to ask Google.

Hope this helps you on the Subversion side of things!
Cheers
Mohit.