Best Way to Host a Rails App on a Windows Server? - ruby-on-rails

I have a simple rails app that I need to deploy on a Window Server 2008 R2 server. I have looked around but have not found much on the topic. What are some simple / best ways of accomplishing this? Thanks!

I'm not sure if you can use Capistrano to deploy on windows. Otherwise you may want to have a look at kwatee (self-promotion). I haven't looked at deploying Rails app yet since Capistrano is the tool of choice there but kwatee is a free tool that can deploy pretty much anything from stand-alone applications, web applications on any platform, including windows.

Related

RoR + IIS. What kind of problems I would run into? [duplicate]

This question already has answers here:
Ruby on Rails on IIS?
(6 answers)
Closed 8 years ago.
It looks like that most of the time people are running RoR behind nginx/Apache web servers. Right now our workshop uses only Microsoft's products. So most natural move would be to try and run RoR using IIS 7.5.
It does look that setting up RoR and IIS is a quite a pain. However, besides problems setting up IIS I could not find anyone pointing out problems with RoR behind IIS.
Are there any issues I would definitely run into if I would choose this "lovely" path of IIS?
Sure, it's possible, but you are setting yourself up for trouble. Configuration, deployment, and troubleshooting will be constant hassles under IIS. If you really want to host internally, I'd setup an Ubuntu server in Hyper-V, use Nginx, and be done with it. On the other hand, if your shop isn't built to deal with managing a Linux server or hosting a Rails app internally, I think it would be more reasonable to consider Heroku or another PaaS before dealing with IIS.
EDIT: Coming from a background in Windows IT, I know that setting up a Linux server and managing it isn't always as easy as "do it and be done with it," so don't think I'm not sympathetic to where you're coming from. The thing is, while the "natural move" might seem like trying to do it in IIS, it is an unnatural move as far as Rails is concerned. My suggestion to anyone who isn't ready to make the plunge into both Linux and hosting their own Rails apps really is Heroku. Even with the know-how to configure Linux for Rails, I still use Heroku for all of my Ruby MRI apps.

Ruby on Rails: Developing in the cloud

I've taken over a rails site, and learning along the way.
It's been a real pain getting the site pulled down from git and working properly in OSX (mysql, REE, ruby_inline gem etc). It seems can be a little fiddly to get some of this stuff working cross os.
Our live production runs on ubuntu.
I have been developing on a cloud hosted server using vi / git etc and it's working quiet well, but it's a little slower (not much) to refresh pages etc and test.
I'm curious, is anyone developing in the cloud? Or do you run a local linux VM. Curious to hear about thoughts and experiences from the battlefield.
Many thanks,
b
It's a "default" environment when you have OS X on local and Linux on production servers. Many of rails-developers use it for everyday development and testing process.
You told "It's been a real pain getting the site pulled down from git and working properly in OSX", just ask a question here what exactly had a pain to setup? Ruby? Rails? Git?
No, it's almost the same platform, OS X is a BSD-based system.
Homebrew will help you to setup DB engine, GIT
RBEnv - multiple Ruby version handle
Rubygems - crossplatform GEM packaging
"I have been developing on a cloud hosted server using vi" - what does it mean? It's actually not a pattern of development process. What if you broke something straight on production server while business users are doing a demonstration to clients?
"I'm curious, is anyone developing in the cloud" - rather no, than yes. You can develop anywhere, but the code snapshot should be available to test and preproduction usage.
If we are talking about standard approach and typical task, it already has typical patterns and solution to achieve the goals
I think you will find most people develop on osx, some on linux, but by far the normal way to do it is locally rather then on a remote server

Choice of platform for running web site on Amazon EC2 Linux instance using Solr

I'm a Microsoft guy feeling pretty confident building ASP.Net sites running on Windows. That's basically what I do for a living.
Now I'm considering building a Facebook web app on my own and started looking for hosting solutions. I found the Amazon Web Services Free Usage Tier offer pretty compelling. And having the web site in the cloud also seems like a good idea if it becomes popular.
The problem with the offer is that it's only for Linux instances and I don't know squat about that platform.
I've planned to use Solr as my search engine (and perhaps the only data store) since I'm familiar with it and it's just great from a performance and feature standpoint.
Right now I can see two alternatives that both have pros and cons.
Ruby on Rails
I don't know the platform or language but it seems to have pretty good integration with Solr. It would be fun to try something completely different and RoR seems very popular right now.
Mono
I would be familiar with the platform and the language but it seems to lack in Solr integration.
Any thoughts or pointers to resources would be great. Like I said, I feel a bit lost stepping outside of my comfort zone.
It's really hard to advise someone with completely different background. First you have to forget for a minute all that you know about Linux :)
I would try heroku.com
You don't need to know Linux to deploy to heroku. They have a free plan and they have a Solr add-on, $20/month though.
Be warned: If you go RoR route you may never come back to ASP.NET again. No kidding.

Setting up a Ruby development environment [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am currently trying to set up a development environment for learning Ruby. The environment will primarily be for getting to grips with the language, but I will most probably move on to development with Rails after long. With web development a target, I would like to hear about preferred web servers and databases.
I plan on setting up the environment on a virtual machine, so I'm not worried about trashing the thing. Therefore, I am open to using a Linux distribution, OSX or Windows as the operating system.
I'm moving from C#, so I'd like to be forced into the Ruby way of thinking to a certain extent. Obviously, that's easier said than done.
What OS do most Ruby developers use?
What is the easiest IDE to get to
grips with coming from a background
of using Visual Studio?
Which
database is used most within the Ruby
community?
Which database is most
likely to be supported by most web
hosts?
Which web server is the
easiest to configure? To get up and
running in the shortest amount of
time.
Hopefully I have provided all the information needed and hopefully this will aid others in setting up their own environments.
Thanks
Edit:
Thanks guys. Some really good
suggestions so far, all of which I'll
take on board. I'm currently wading
through the copious articles surrounding
initial RoR setup on Linux, as I like to
understand how things work and are
tied together. Also, because it's all
free...
I'm currently putting together a
virtual machine (so I can break stuff)
using:
Ubuntu
SQLite
No webserver, I plan on using whatever development server comes with Rails out of the box, initially
Redcar Editor
Edit 2
I have setup a couple of environments
now.
I have the ubuntu setup running in a
Virtual Machine on Windows and decided
to try decking my Mac out for ruby
development too.
Overall, I'd have to say setup for the
mac was a lot less painful than the
linux setup. On the mac I'm running
with:
SQLite that comes with OSX out of the box(!)
TextMate (trial version, but loving it)
Mongrel web server
I've progressed from learning the ways
of Ruby to writing some simple
websites with Rails and am finding
development with Rails really simple
to use. I have also set up a GIT
repository on my working directory and
am currently trying out Heroku.
Thanks for the help, everyone.
If anyone would like any more information about setting up on either environment, I'd be happy to provide more detail.
What OS do most Ruby developers use?
Mac OS for most, but any Linux distro will do (Ubuntu/Fedora etc).
What is the easiest IDE to get to grips with coming from a background of using Visual Studio?
Textmate is quite popular if you're on Mac. Netbeans and Aptana are there if you need something similar to enterprise world. Emacs/Vim is ok too.
Which database is used most within the Ruby community?
So far most Ruby / RoR guys I know use open source databases. sqlite for local development while Mysql or Postgresql for production. My advice, sqlite is easy to learn, while give a try with Mysql or Postgresql, you might not know when your clients going to ask you to develop on them. Mysql is very popular. Postgresql I think has lot more features (personal preference).
Which database is most likely to be supported by most web hosts?
Mysql is most supported by shared hosting hence the M in LAMP (Linux/Apache/Mysql/Php). But Postgresql is getting more support too. Some hosting companies even support both but Rails developers usually prefer to use VPS (slicehost.com/linode.com) and manage all these themselves. Checkout heroku.com too for deploying your Rails app without needing much knowledge in sys admin stuffs.
Which web server is the easiest to configure? To get up and running in the shortest amount of time.
Developing with Rails you'll get webrick as a development server where you can test ur app locally. But for production I prefer modrails.com where you can choose between apache/nginx. I prefer to use apache since that is what I'm used to.
You'll want to look at RVM from the start, this takes away a lot of the pain of managing Ruby versions and gems.
Judging from the laptops I saw at Railsconf last June, Rails developers are about 90% OSX, 9.9% Linux, and there's like 1 or 2 guys on Windows.
Personally I use Textmate when I'm at home on OSX and gedit and redcar when I'm at work on Ubuntu Linux. I use sqlite for development mainly with mysql in production, but mongodb seems to be the new hotness, but I haven't done much more than some sample apps with it so I can learn it.
Virtual hosting providers will probably give you a choice of whatever database you want. Heroku is awesome and is used for deploying Rails applications via git, and uses postgres but has plugins to use mongodb if you want to go that way.
For what the community at large is doing, check out Thoughbot's survey results at: http://robots.thoughtbot.com/post/308239139/2009-ruby-survey-results
You might have a look at the Bitnami installer, which claims to create a full Ruby/Rails stack. There's also a VM version, so in theory you could just grab their VM and start coding your app. (YMMV -- personally I haven't tried it).
OS
Most ruby developers seem to gravitate towards Macs for some reason, with a few linux and some windows devs. That said, I use windows for all my ruby work and haven't really run into any huge roadblocks. Your safest option will probably be a Mac, if you want to be on the same side as most of the community.
IDE
You don't really need a full-blown IDE for ruby, as you would for something like C#. Most mac users seem to use textmate. I personally use redcar. It's not fully completed yet, but it can be used on Windows, Linux or Mac, and I've yet to run into a feature I need that isn't provided. It is written in ruby, can be extended through plugins, and supports textmate themes and snippets. To supplement redcar, I've actually written a shell in ruby for my own use. It's still in alpha stage, but I've got features like grep and ls working, and capabilities for working with and manipulating files. You can extend it with ruby, and actually use any ruby command inside the shell. It's hosted here, and is currently for use on windows. After I get some more features in, I might start looking at Mac or Linux ports.
Database
Open source options like sqlite and mysql are used widely. I don't have enough experience on them to really comment on the differences. For what it's worth, Heroku (which is great for hosting) uses Postgresql.
Server
You should use a lightweight server like Thin for development, to test your app. For production, have a look at modrails.com (as a few other answers have suggested).
Good luck with whatever you choose.
OS
80-20 Mac-Linux. I've seen one Windows ruby dev so far. If you use and debian (ubuntu is a debian), take a look at rvm, because debian cripples rubygems.
IDE
You can code ruby without an IDE, grab an editor of your choice. We've got emacs, vim, textmate, gedit here. If you really want an IDE, get rubymine.
Depends on how good your shell-fu is ;-)
DB
sqlite >:)
Server
For development, rails server should do. For production, my recommendation is unicorn, paired with nginx.
Further stuff:
http://github.com/edgecase/ruby_koans
And go for rails 3 beta.
Tutorials
ruby-lang.org/en/documentation/quickstart
Ruby community
ruby-lang.org/en/community/
I think Linux(Fedora) would be best for you
For data base mysql is very popular
most prefered web server
http://www.modrails.com/
http://github.com/fauna/mongrel
Ruby mine is good IDE
http://www.jetbrains.com/ruby/

Using rails or ASP.NET for website on Windows

I need to create a site that interact with some windows applications.
Currently this is done through direct calls so I would like these to run on the webserver.
This means that the site will have to run on a Windows based system.
I have been doing some ruby lately and am very keen on using rails for the site, but have at the same time seen plenty of discouraging posts regarding this.
Should I rather use ASP.NET (MVC) for a windows system or is rails stable enough to handle this?
Ruby on Rails on Windows is not ideal, but it does work, and works just fine for most purposes. The biggest issue you will likely run into is that the community of people running RoR on Windows is very small, so the issues you do run into which are specific to RoR+Windows may be harder to get help on.
If leveraging existing community is very important to you and/or your project, then I do recommend going with ASP.NET MVC. The community there is much larger and easier to connect with than RoR+Windows, which is fairly niche. Although it's difficult to put an objective value on the added benefit of having a community of support, it's clearly one of the biggest selling points for any platform - the RoR community in general, for example, is a huge part of its continuing success.
I would add to Rex's answer that RoR+Windows is fine for development, but i would not use that as a production setup. In my case i do a lot of work in Flash/Flex/Photoshop while working on the backend at the same time, and of course running those graphics heavy apps on Linux is not very ideal, but the server i deploy to is Linux which is the only part that really matters.

Resources