running rails 3.1.1 on windows as a service - ruby-on-rails

My goal is to run a rails 3.1.1 app as a service on a windows box that is accessible to a local intranet.
if it isn't possible to run as a service, what would be the preferred method to run my rails app?
advice/suggestions/opinions welcome!

You should check out the mongrel_service gem, which currently offers the simplest solution. It wraps mongrel in a service.
But i also wrote a blogpost how to create a service using thin.
Hope this helps.

Related

Can I keep my database on my local network but deploy my rails app on a hosting service?

I have a rails application that is currently hosted on Heroku. It is used on our local network only, and my boss does not want a 3rd party hosting our data. I convinced IT to set me up a virtual windows server to deploy my app on. However, it has been very difficult to set up for production.
Is there anyway that I can use a hosting service for my application, but have the database reside on our local network?
Or is there an easier way to deploy a rails app on a windows server? I have been looking into using the Linux Subsystem for Windows.
If your app is used on your local network only, why not ditch Heroku and host your Rails app locally as well? What benefit is a scalable cloud hosting provider giving you? Especially since it seems your boss has security concerns about remote hosting of a database. Bringing the entire thing in house may be the best solution.
Simple answer is yes you can, but why would you. It's simpler to run your application locally than connecting your remote app to a local database.
Your best bet is to use a Linux virtual machine instead of Windows, usually there is to much hassle to get rails application to work on windows, especially compiling native gems.
I suggest that you get a CentOS VM, and install Nginx with passenger gem using rbenv or rvm.
Digital Ocean has a nice guide that explains this process in details:
How To Deploy Rails Apps Using Passenger With Nginx on CentOS 6.5

Start Juggernaut and Redis with rails app

I'm developing a app with Ruby on Rails. It uses juggernaut. Is there anyway I can get redis and juggernaut to start when I run rails server. thanks
Yes, but a better way is to use software designed for the purpose, such as Foreman. It's a Ruby program for running and monitoring processes alongside your web app and is very easy to configure, plus it exports to upstart and init, either of which you're likely to be using in production. Take a look, I think you'll like it.

Flash Remoting and Rails

I'm having some issues trying to get Flash remoting to work with a Rails project. Specifically, I'm a little confused about the configuration.
I'm using WebOrb for Rails to interface Flash and Rails. What I want to do is to be able to run a local Flash Builder project locally, and have it remote to another server running the Rails application and database on another machine.
To be honest, I don't really know where to start, specifically with actually getting it configured to talk to the other machine. The server running Rails is running Ubuntu, and I'm planning on using Flash on both my Mac and Windows machines.
Any help is appreciated, thanks.

Ruby on Rails and WebSphere Can I have both and either?

I read where you can have Ruby on Rails running in WebSphere and I think I might try it. If I make the website in RoR in WebSphere but later want to run just ruby on rails with with Apache, can I do that? I want websphere because I'll want it for other things but I have another problem where the same website will suffice but cannot take the overhead of websphere (but can ror).
Thanks.
Yes. You can write the pure rails app first and run it on JRuby, then convert it to WAR, install activerecord-jdbc-adapter and deploy on Websphere. Here is a nice guide: http://www.ibm.com/developerworks/websphere/techjournal/0801_shillington/0801_shillington.html
When you are done with websphere just redeploy the app as pure rails on apache or even better on mod_passenger (and switch to normal db adapter)

Ruby On Rails on Windows with Mongrel

Where is the best tutorial for getting Ruby On Rails working on a windows box with Mongrel? I'm a complete novice at server management, so the more detailed the better!
You can follow this tutorial, it will get you setup you can actually manage your Mongrel server as a Windows service (start/stop/restart, start on boot, manage programatically etc etc):
How to setup mongrel as a native Windows service
I'm currently using this method to manage an instance of Redmine on a Windows box and it works wonderfully.
Good luck!
I have found the book "Deploying Rails Applications" very useful. Specially the chapter "Deploying on Windows". It gives you step by step instructions to deploy a Rails application using Apache and Mongrel
Rubystack is a free Windows Rails installer that we keep up to date and includes Mongrel support out of the box

Resources