Rails with Phusion Passenger and Apache

Have you considered using Heroku? Then you will not have the problems of setting up, maintaining, and especially the securrity issues, of trying to run your own server.

Colin

I gave him this tip earlier, it seems that he refuses it. Probably feared by the expenses?

<snip>

Hint 7: Last but not least: Learn to use a deploy-tool like Capistrano or Vlad, it will make many things easier and do things automatically that I personally would forget with every deploy (see Hint 5 and 6 :slight_smile: )

Can I deploy app using Capistrano without Passenger? I have another question that using Passenger is correct option or not?

Can I deploy app using Capistrano without Passenger?

Yes.

I have another question that using Passenger is correct option or not?

It's just one of many options; the decision is yours.

Can I deploy app using Capistrano without Passenger?

Yes.

Is there any drawback of using it?

I have another question that using Passenger is correct option or not?

It's just one of many options; the decision is yours.

OK But I want suggestion.

Can I deploy app using Capistrano without Passenger?

Yes.

Is there any drawback of using it?

Not that I'm aware of.

I have another question that using Passenger is correct option or not?

It's just one of many options; the decision is yours.

OK But I want suggestion.

I suggest you try it and decide if it meets your requirements :slight_smile:

Yes, Capistrano can be setup to do whatever you want, including provisioning servers, though personally I prefer to deploy to a central server via Git then that server is designed to deploy, manage, report, and test the code and then deploy it to all the other servers and also provision extra servers if needed, via Juju. Though that solution is probably way out of the way of what most people would want. Way, out of the way of what most people want.

There is nothing wrong with using Passenger since it's the easiest solution to work with, the only thing annoying about passenger is that it takes over error pages and that is pretty annoying to somebody like me who is happy to use passenger and even happy to mention that I use it but do I want them controlling my errors? No, I don't know how to turn it off and don't care to know.

That said, I use passenger on my dev machine because it's pure easy to work with, I don't need to restart the server or manage anything more than the apache server and issue a tmp/restart.txt if I need a hard restart of the passenger server, on production I prefer to deploy with Thin or Unicorn with Apache Event or Nginx. Though lately I sway towards Apache 2.4 w/ Event.

<snip>

Yes, Capistrano can be setup to do whatever you want, including provisioning servers, though personally I prefer to deploy to a central server via Git then that server is designed to deploy, manage,

I have tried it with Capistrano. I have installed it properly and also configured it. But when I open domain(mandeep) in browser it shows message: We're sorry, but something went wrong.

What does it mean? Rails application is started or not?

Result of cap deploy $ cap deploy   * executing `deploy'   * executing `deploy:update' ** transaction: start   * executing `deploy:update_code' Please specify the repository that houses your application's code, set :repository, 'foo' *** [deploy:update_code] rolling back   * executing "rm -rf /u/apps/mysite/releases/20121007124955; true"     servers: ["mandeep"] Password:     [mandeep] executing command     command finished in 229ms

Check Its correct or not.

Have you tried doing what the error message tells you to do?

At least, that's where I would start :slight_smile:

Here i have confusion about repository. Its github repository or something else?

I have solved this but getting anther error.

Check this

** [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: mandeep (Net::SSH::AuthenticationFailed: mandy) connection failed for: mandeep (Net::SSH::AuthenticationFailed: mandy)

How can i solve this?

It's the repository for your code.

Done! This is solved.

But getting another error of

** [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: mandeep (Net::SSH::AuthenticationFailed: mandy)

How to solve this?

Ideally, install your ssh keys on your server so you can login (and use capistrano) without being prompted for a password.

Not getting.

Not getting what? What did you expect to get, and what are you getting instead?

"Doesn't work" or similar are the worst descriptions of an error or missbehaviour I am aware off.

We can only help you, if you give appropriate reports or questions.