How do I run Rails on Windows Server 2003 or 2008? - ruby-on-rails

I developed a Rails application on Linux and it's about to launch, but my client's IT guys stopped it saying they want it to run on a Windows in-house server. I've never run a Rails application on Windows, but now I have to.
Questions:
They will set up a dedicated Windows machine. Which is better, Windows Server 2003 or 2008?
Do I use IIS web server? Is there any better option?
I use Paperclip plugin with ImageMagick. What's the equivalent on Windows?
Do you any advice for me?

Running on Windows might be far from ideal, specially if your application used components that lack working version on Windows.
If is an application for intranet usage, you can deal running Thin standalone instead of putting things behind IIS. You will need to make your app work as service. For Rails 2.3 you have mongrel_service. For Rails 3 there is no service solution right now.
If you require to use IIS, please ask the IT guy to look at Helicon Zoo
There is ImageMagick for Windows, and works with Paperclip.

The easiest way is installing the application inside a Linux Virtual Machine above Windows Server, and treat it like an independent server in your network.

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

How to deploy a rails application on Windows PC (windows 7 / windows 8)?

I have built a rails app which is used as a standalone enterprise application. The application needs to run on Windows desktops (entire user base runs Windows machines). I am able to run it quite successfully on an Ubuntu machine but it's not something customers will prefer to run.
Since deploying on a windows machine is quite messy AFAIK. I would like deploy it on Windows using a virtual machine (VirtualBox).
Requirements would be -
Application installation on Windows 7 / Windows 8.
User should be able to access rails server by browser running on his/her system via localhost or any other IP address.
Application should auto-start when user reboots the machine.
Ideally user should be able to download and install the software on his/her machine by himself/herself.
I am working to make this work but would like to know the feasibility of this solution. Would like to if I am getting the concepts wrongs or if there is something which is simply not possible or is not making any sense.
Take a look at Vagrant, which is a highly scriptable VM host. You can then generate batch files to automatically start the VM on boot.
To deploy new code, you'll just want to provide them with a new VM image they can copy into your app directory.
That said, I agree with other comments that this might not be the right platform for your use case. The main reason for building web apps is so that many clients can use your app over the web using just one set of servers. Deploying a web server to each client seems like it's defeating that advantage.

Rails Production Web Server on windows

I'm almost finished with the development of my first ruby on rails app. I am using windows for development. Now i want to deploy my app (most likely on iPage web hosting). the procedure described in Agile Web dev... appear to only work on MAC OS X (with passenger, etc) and didn't have much luck googling.
My questions are:
1- Is there a good and easy to follow tutorial/book/etc on how to set up local production server on windows (e.g. using apache and mysql (Possibly WAMP)) and porting it to a remote host?
2- can the book "Deploying Rails Applications: A Step-by-Step Guide" help me?
3- Would it worth the effort that i install VMware,Ubunto (or another Unix/Linux based OS) and do the production there?
Thank you!
I ran into a similar situation where we had to decide on Rails app deployment to a Windows server rather than to a Linux one. I did some research but never tried out anything since fortunately we decided to stick with a Linux server. I was not particularly happy with what I found but here it is in case it helps:
Deployment to Windows using Capistrano based gem
Articles on other deployment options to Windows

Lightest way to run IIS on Mac?

I have an ASP.NET MVC 4 app that I would like to run on a Mac machine. I would hate to run a full blown Windows virtual machine when all I really need is IIS7 to run the MVC app. What is the lightest way to run this (VirtualBox, Parallels, IIS7 Express, etc)? Really my goal is to code the Javascript/client-side of the app on my Mac and I am trying really hard not to do my development on a Windows machine :)
BEWARE: The below answer is very old and I don't delete it just for historic purposes. These days I would recommend to install ASP.NET Core along with .NET6. After you have set that up, there are different ways to expose your web port in production, such as NGinx reverse proxy, or Kestrel or other things that I haven't researched much these days.
Follow this link (provided by #LexLi in a comment above) to know how to set up your MVC environment.
With regards to IIS, as far as I know it cannot be done. You should use the native web server of your operating system. IIS doesn't run on Mac, so I guess you should try Apache, and then install module "mod_mono".
Or if that gets too hairy, just use the standalone mono web server called XSP.
Or run FastCGI, or nginx.
It is all explained here: http://www.mono-project.com/ASP.NET
I use Parallels, and although their software was poor a few years back, it's now lightyears ahead of VMWare in stability and performance. Parallels Desktop 7 for mac is awesome.
My only computer is a MBP, yet I develop software for IIS. I run Parallels in Coherence mode, and I essentially have VisualStudio as just another mac app. And since I'm only running one app in the VM, it's way more stable than a normal PC install. I actually haven't rebooted it in 2 months so far!
Only caveat - you want to dedicate 2-4GB of ram to the VM to prevent paging, so you should try to get more than 8GB if you're a polyglot developer. Having multiple IDEs on multiple OSes can be heavy, and when you add the memory-hogging yet blazingly fast Chrome to the mix, you'll hit that ram limit often...
xsp is a alternative for IIS in Mac, that can run basic capabilities.
I recently used VirtualBox with a copy of windows home (free with "I don't have key") and installed visual studio on it (community version). And IIS Express works just fine, TFS repos work too.

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.

Resources