# Execute as a service

**URL:** <https://www.ruby-forum.com/t/execute-as-a-service/230622>\
**Category:** Rails\
**Created:** [June 26, 2014, 3:26pm UTC](https://www.ruby-forum.com/t/execute-as-a-service/230622 "2014-06-26T15:26:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason\_sam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7993a0/32.png) [@jason\_sam](https://www.ruby-forum.com/u/jason_sam)\
**Post date:** [June 26, 2014, 3:26pm UTC](https://www.ruby-forum.com/t/execute-as-a-service/230622/1 "2014-06-26T15:26:27Z")

</div>

Hello,

I am new in this mail list. I want to ask about the execution of the  
Rails service.

I normally execute the rails process this way:

rails server

This way I can not log out and keep the service running. Is there any  
way to execute as a service? something like apache2?  
(/etc/init.d/apache2 start)?

Thanks and regards.

–  
Josu L.

---

<div class="post-metadata">

**Author:** ![Josu\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c4cdca/32.png) [@Josu\_L](https://www.ruby-forum.com/u/Josu_L)\
**Post date:** [June 26, 2014, 3:33pm UTC](https://www.ruby-forum.com/t/execute-as-a-service/230622/2 "2014-06-26T15:33:35Z")

</div>

On Thu, Jun 26, 2014 at 6:01 AM, Josu L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I normally execute the rails process this way:
> 
> rails server
> 
> This way I can not log out and keep the service running. Is there any  
> way to execute as a service? something like apache2?  
> (/etc/init.d/apache2 start)?

Try: rails server --help

–  
Hassan S. ------------------------ [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[Hassan Schroeder | about.me](http://about.me/hassanschroeder)  
twitter: @hassan

---

<div class="post-metadata">

**Author:** ![Josu\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c4cdca/32.png) [@Josu\_L](https://www.ruby-forum.com/u/Josu_L)\
**Post date:** [June 26, 2014, 3:35pm UTC](https://www.ruby-forum.com/t/execute-as-a-service/230622/3 "2014-06-26T15:35:23Z")

</div>

On Jun 26, 2014, at 9:01 AM, Josu L. wrote:

> way to execute as a service? something like apache2?  
> (/etc/init.d/apache2 start)?

Here’s a quick overview with a lot of options:  
[http://rubyonrails.org/deploy/](http://rubyonrails.org/deploy/)

I used Passenger for my first sites, it was just about as easy as PHP  
deployment.

Walter

---

<div class="post-metadata">

**Author:** ![Josu\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c4cdca/32.png) [@Josu\_L](https://www.ruby-forum.com/u/Josu_L)\
**Post date:** [June 26, 2014, 10:11pm UTC](https://www.ruby-forum.com/t/execute-as-a-service/230622/4 "2014-06-26T22:11:25Z")

</div>

Thanks!

I execute as daemon (rails server -d), and it works well.

I read about Passenger, it looks really interesting.

Best regards.

–  
Josu L.

---

<div class="post-metadata">

**Author:** ![Josu\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c4cdca/32.png) [@Josu\_L](https://www.ruby-forum.com/u/Josu_L)\
**Post date:** [June 27, 2014, 1:21am UTC](https://www.ruby-forum.com/t/execute-as-a-service/230622/5 "2014-06-27T01:21:58Z")

</div>

Josu L. wrote in post #1150848:

> Thanks!
> 
> I execute as daemon (rails server -d), and it works well.
> 
> I read about Passenger, it looks really interesting.

I actually use Passenger standalone for development and Passenger on the  
server for deployment. Works great for me.

I don’t, however, typically run my server in development as a daemon  
process. Instead I run it in a separate shell so that I can easily  
monitor the development log as it displays in the terminal window. Then  
I use the other shell to execute commands. So I just have two tabs in my  
Terminal app… well actually three, where the third is running guard so  
I can see the results of my texts as I develop.

> **[Passenger - Enterprise grade web app server for Ruby, Node.js, Python](https://www.phusionpassenger.com)**
>
> Passenger is a rock-solid, feature-rich web app server that integrates with Apache and Nginx. Serve millions of customers with confidence

[http://guardgem.org](http://guardgem.org)

---

<div class="post-metadata">

**Author:** ![Josu\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c4cdca/32.png) [@Josu\_L](https://www.ruby-forum.com/u/Josu_L)\
**Post date:** [June 27, 2014, 8:38am UTC](https://www.ruby-forum.com/t/execute-as-a-service/230622/6 "2014-06-27T08:38:22Z")

</div>

2014-06-27 1:21 GMT+02:00 Robert W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> [https://www.phusionpassenger.com](https://www.phusionpassenger.com)  
> [http://guardgem.org](http://guardgem.org)

Thanks Robert,

Do you use Passenger with Apache2? I want to try it. Could you guide  
me with some steps?

Best regards.

–  
Josu L.
