Try "Deploying Rails Applications"[1] from the Pragmatic Bookshelf. It
covers what you're looking for.
[1] http://pragprog.com/titles/fr_deploy/deploying-rails-applications
-- Bob
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
Yeah, stuff moves pretty quickly but a lot of what is in the book
still applies. I bought it about a year ago and didn't think it was
outdated. It will also give you a really good foundation and makes
learning the newer choices easier to pick up.
--Bob
Mercurial is a version control system -- though it's not in all that
wide use in the Rails community. I think most Rails developers use Git.
Which version control system are you using?
(Hint: if the answer is "none", fix that *today* by installing Git.
There is no excuse whatsoever for neglecting version control.)
Also, check out Heroku for very easy Rails deployment.
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
--
Posted via http://www.ruby-forum.com/.
Definitely.
> I
> still plan to read the aforementioned book, I don't think it would
> hurt.
Why do you want to read an outdated book?
>
>
> > �Which version control system are you using?
> > (Hint: if the answer is "none", fix that *today* by installing
> Git.
> > �There is no excuse whatsoever for neglecting version control.)
>
> Well, I never plan to neglect vc... that's partially why I created
> this thread because I wasn't sure what to use. I already have Git
> installed (which I installed quite some time ago), but I don't
> understand how to use it quite yet so that's why I'm reading what I
> can about it... but I need a book that is going to take me through it
> via baby steps since I don't have any experience whatsoever using Git,
> (or any other vc as far as that goes but Git is what I'll probably use
> in the end.)
I don't know of any books on Git. But there are plenty of Web
tutorials.
Just start using it. Also use RSpec and Cucumber to do all development
test-first. Serious development in 2010 absolutely requires both
version control and automated tests.
>
>>
>> Also, check out Heroku for very easy Rails deployment.�
>
> I will def look into that, thank you for the reference.
>
> Thanks again,
> Jeremy
Welcome!
[...]
> I'm currently developing on Windows.. started with using InstantRails
> and installed Git on Cygwin. This allowed me to experiment with some
> developing locally, begin with local version control and git-clone
> repositories for plugins/Gems.
> As I read some more, I realized I'd probably want to deploy my App on
> a Linux/Unix based server rather than a Windows one and that
> developing on windows and deploying on Linux (the way I initially
> started developing) might not be a good idea at all.
> Therefore I decided to install VM on my Windows machine.. have seen
> some posts lately on the subject.. currently I just installed VMWare
> Player (had to use version 2.5, my CPU wasn�t compatible with 3.1) but
> have thoughts of maybe trying VirtualRails instead (if it works on my
> machine) � I did see VirtualRails is using MintLinux-based Linux and
> was wondering whether that might cause future problems (as opposed to
> using Ubuntu for example)?
I doubt that that would be a problem. I develop on Mac OS X (which is
BSD, not Linux) and routinely deploy to Linux servers without any
problem.
[...]
> Ok � deployment questions:
> I couldn't understand for sure whether I need both a host and a place
> to deploy my App?
No. A host is a place to deploy your app. Same thing.
[...]
> I mean � it didn't make sense I'd use both Passenger and Capistrano
> (probably it does but I understood they're both used for deployment,
> thus the confusion..), unless Capistrano does both automated
> deployment but can also be used when using a different deployment
> service..
They are different tools for different purposes. Capistrano takes care
of putting your app on the server, while Passenger serves it once it's
there.
> I feel and know I mix everything up here, but any light you can put
> for me on this subject will be very helpful..
> Was also confused by the fact Phusion Passenger offers "Phusion
> Passenger for Nginx".. while I got the impression (obviously a wrong
> one, or not full) � I can deploy my app on Nginx as well?
> At least I heard people mentioning Nginx at the same sentence with
> Heroku and Passenger..
Apache and Nginx are Web server programs. By themselves, they just
serve static files without any server-side dynamic content. This is
great for serving static websites, but obviously will not work if you're
using a server-side programming language like PHP or Ruby. For Apache
or Nginx to run PHP/Ruby/Python/whatever applications, it needs a module
to connect it to the appropriate interpreter. That's basically what
Passenger does.
In other words, you need Passenger (or something similar, but Passenger
is probably simplest) in order for Apache or Nginx to talk to the Ruby
interpreter. Passenger is available either as an Apache module or as an
Nginx module.
> This brings me to another question:
> I also understood I can use heroku for deployment, which will require
> not more than one git push every once in a while (of course I know
> there's much more to it, but it was to explain me the ease of use)..
> in case I do use heroku (couldn't find any cons to using it I should
> be aware of, if someone can write a few from his/her experience, I'll
> be glad to learn..) � can I git push from my local repository or do I
> need first to push to a remote one, such as a public/private
> repository on GitHub?
You can git push from anywhere. Heroku doesn't care.
> Moreover, if I'm the only one playing around
> with this app right now � what benefits can a GitHub repository give
> me comparing to using it locally?
It gives you another copy of the code stored offsite.
[...]
> More about Heroku � if I choose to use it, do I need a host as well?
Heroku *is* a host.
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
--
Posted via http://www.ruby-forum.com/.
Er, I was talking about Mint Linux vs. Ubuntu Linux (which shouldn't be
a problem), not Windows vs. *nix (which might well cause problems).
>
> I did have another reason to go and install VM, though I'm not sure it
> was a correct one, short description as follows:
>
> In one of the posts around I read about Cappuccino and it looked
> great, so wanted to try it out as well for my User Interface.. but the
> download instructions contain a shell script I'm supposed to be
> running (if I understood correctly), when not building from the source
> (being a Newbie and after reading a bit I assumed this was not for me
> yet).
> Anyway, when happily going to Cygwin to run the bootstrap.sh file I
> encountered the following message:
>
> "Error: Narwhal is not compatible with your JVM. Please switch to the
> Sun (HotSpot) JVM and re-run bootstrap.sh"
[...]
This is probably better directed to a Cappuccino forum.
> Also another question about Heroku -
> being a host, I was wondering why would it guide me to point my DNS
> server to Heroku, Zerigo being recommended?
> Do I need to purchase separately a DNS service when deploying to
> Heroku?
You have to pick a domain registrar -- Network Solutions, GoDaddy,
etc. -- to register a domain name. That registrar should offer DNS
service as part of the registration.
For development and learning purposes, you don't even need that,
as your heroku deployment will just appear to be a subdomain, e.g.
http://example.heroku.com/
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
> I looked for the way to use any thing else other than GIT, because it
> is not free
Huh? Where did you get that idea?
From the git site:
Git is a free & open source, distributed version control system
designed to handle everything from small to very large projects
with speed and efficiency.
The book is overbloat. The author suggests to run your rails setup in a
Xen virtual machine! Well he sells rails hosting...
Capistrano is not necessary when you know how to use a good scm such as
mercurial. A simple bash script + mercurial does everything capistrano
can do, and it won't crash on you.
Basically you need:
- Server
- Domain name
- Install Ruby. I would recommend to stick to 1.8.7, as I'm having
painful issues with 1.9.1 and other people too.
- Install Passenger, and Nginx
- Install a database backend
- Get your code on the server. That's where I use my bash+mercurial
script.
And you should be good to go. Depending on your skills this can take
more or less time. Once you know how to do it once, it's easy.
My update script:
hg push ssh://... && ssh -t user@ip 'cd /myapp_path && hg update &&
RAILS_ENV=production rake db:migrate && touch tmp/restart.txt'
Do I need hundreds (thousands) of lines of ruby code to do that?
Certainly not. But yeah, it's cap, it was started by jb, it's ruby, it
supports svn and cvs... it's gotta be cool!
I did use capistrano, and it would eventually stop updating the code due
to some obscure problem. My dumb bash script never disappointed me.
I use git. I already have an apache web server with the passenger mod
in place, so deploying my rails app is as simple as:
/path/to/app> $ git pull
Just don't check in your database.yml :-)
You can have passwords, database.yml etc in .gitignore so those files
aren't visble/posted on your repo
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
should this be created manually or is it present as part of git install?
I have git installed and couldn't find this file in
/home/myuser/myrailsapp/.git
-thanks
--
Posted via http://www.ruby-forum.com/.
Thanks for this listing.
I think this will be helpful to everyone.
Ulises Ramirez-Roche wrote:
> The .gitignore file should be created in the root directory of your
> rails
> project. It tells git which files to ignore when looking at files to
> commit,
> for whatever reason. So create a .gitignore file (like you would any
> other
> file) and copy/paste this snippet in there.
>
> *Sample .gitignore file*
> .bundle
> db/*.sqlite3
> log/*.log
> tmp/**/*
> tmp/*
> doc/api
> doc/app
> *.swp
> *~
> .DS_Store
>
> It may look like a bunch of warlock magic, but it's not that
> complicated.
> You're essentially telling *git* to *ignore:*
>
> .bundle files & .DS_Store - These files are used by MacOS to do MacOs
> stuff.
>
> db/*.sqlite3 - All files inside the db folder that end with sqlite3
> (test
> and dev stuff)
>
> And so on.
--
Posted via http://www.ruby-forum.com/.