Rails with Phusion Passenger and Apache

On 30 September 2012 09:42, Mandeep K. [email protected] wrote:

On Sun, Sep 30, 2012 at 2:03 PM, Colin L. [email protected] wrote:

Do you need the website to be accessible to the global internet or just
locally?

Global Internet.

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

2012/9/30 Colin L. [email protected]:

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.

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

On Sun, Sep 30, 2012 at 4:13 AM, Norbert M. [email protected]
wrote:

2012/9/29 Mandeep K. [email protected]:

> 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 :) > )

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


Mandeep K.

On Mon, Oct 1, 2012 at 7:00 AM, Mandeep K. [email protected]
wrote:

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.


Hassan S. ------------------------ [email protected]

twitter: @hassan

On Mon, Oct 1, 2012 at 9:00 AM, Mandeep K. [email protected]
wrote:

On Sun, Sep 30, 2012 at 4:13 AM, Norbert M. [email protected] wrote:

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?

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.

On Mon, Oct 1, 2012 at 7:40 PM, Hassan S.
[email protected] wrote:

On Mon, Oct 1, 2012 at 7:00 AM, Mandeep K. [email protected] wrote:

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.


Mandeep K.

On Mon, Oct 1, 2012 at 7:16 AM, Mandeep K. [email protected]
wrote:

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:


Hassan S. ------------------------ [email protected]

twitter: @hassan

On Mon, Oct 1, 2012 at 7:51 PM, Jordon B. [email protected]
wrote:

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.


Mandeep K.

On Sun, Oct 7, 2012 at 6:55 PM, Hassan S.
[email protected] wrote:

On Sun, Oct 7, 2012 at 6:00 AM, Mandeep K. [email protected] wrote:

** transaction: start

  • executing `deploy:update_code’
    Please specify the repository that houses your application’s code, set
    :repository, ‘foo’

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?


Mandeep K.

On Sun, Oct 7, 2012 at 6:00 AM, Mandeep K. [email protected]
wrote:

** transaction: start

  • executing `deploy:update_code’
    Please specify the repository that houses your application’s code, set
    :repository, ‘foo’

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

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


Hassan S. ------------------------ [email protected]

twitter: @hassan

On Sun, Oct 7, 2012 at 7:11 PM, Mandeep K. [email protected]
wrote:

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?


Mandeep K.

On Sun, Oct 7, 2012 at 7:46 PM, Hassan S.
[email protected] wrote:

On Sun, Oct 7, 2012 at 6:41 AM, Mandeep K. [email protected] wrote:

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

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?


Mandeep K.

On Sun, Oct 7, 2012 at 7:20 AM, Mandeep K. [email protected]
wrote:

** [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.


Hassan S. ------------------------ [email protected]

twitter: @hassan

On Sun, Oct 7, 2012 at 6:41 AM, Mandeep K. [email protected]
wrote:

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

It’s the repository for your code.


Hassan S. ------------------------ [email protected]

twitter: @hassan

2012/10/7 Mandeep K. [email protected]:

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.

On Sun, Oct 7, 2012 at 8:06 PM, Hassan S.
[email protected] wrote:

Not getting.


Mandeep K.