Production environment for Rails on Win32, anyone interested

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(CC’ing the instantrails dev list)

Gael P. wrote:

When I meant “too bloated”, it’s because it ships with loads of stuff
which I dont need when I want to setup a Rails prod machine, MySQL,
PHP, PHPMyAdmin, Typo, TclTk Extension, Fx Ruby etc…

Well, we already removed tcl/tk…

I aslo found it incomplete because I wanted to use Apache 2.2 with
FastCGI and Instant Rails ships with Apache 1.3 and SCGI, I also
needed the MySQL extension in binary form, other than that it’s pretty
complete.

I think we wanted to move to apache 2, but we just hadn’t gotten a
stable
version. Also, the binary mysql was something I thought we were putting
in, is
it not?

I fear that it will be too much duplication of effort to have two such
projects
when they have similar goals. Our goal is to make it easy to get going,
but
also to provide the tools for a usable production environment.

Perhaps a better solution is a better installer that can install only
the
requested parts?

I haven’t looked at the license for the mysql admin program, is it ok to
distribute it bundled? That would indeed remove the need for php.


David M.
Maia Mailguard - http://www.maiamailguard.com
Morton Software Design and Consulting - http://www.dgrmm.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFELxkWSIxC85HZHLMRAjqKAKChRTwymxh5lKkUtbptSNBqHKxYTQCbB/Gi
ci9k2P4OXegGfaqREOTJmXk=
=YWJR
-----END PGP SIGNATURE-----

Gael P. wrote:

mod_fcgid on the apache side but with the fcgi module on the ruby side
(which is compiled against the fastCGI library), am I right in
thinking this too? If anyone got it running under linux I would
appreciate to get told which source/software do you need to get it
working so I can have another go on windows.

That sounds right to me. When Rich A. posted the item I quoted from, I
replied asking if he had published the configuration he used, but I
didn’t get a response. I know other are using mod_fcgid, as I’ve seen
complaints about slow startup, and also a recent post about using a
patched version to overcome (if I remember right) the idle timeout.

From a quick look at mod_fcgid the impression I got was that the code
was nicely structured, but didn’t have the degree of configurability
that you get with mod_fcgi (e.g. with respect to setting up a static
pool of FCGI processes). Some cross-fertilisation might be required.

I hope someone else will chip in here with details of their
configuration.

regards

Justin

Hi David,

On 02/04/06, David M. [email protected] wrote:

Gael P. wrote:

When I meant “too bloated”, it’s because it ships with loads of stuff
which I dont need when I want to setup a Rails prod machine, MySQL,
PHP, PHPMyAdmin, Typo, TclTk Extension, Fx Ruby etc…

Well, we already removed tcl/tk…

In the latest version I’ve just downloaded (Version 1.0) Tcl/Tk was
still in it

I aslo found it incomplete because I wanted to use Apache 2.2 with
FastCGI and Instant Rails ships with Apache 1.3 and SCGI, I also
needed the MySQL extension in binary form, other than that it’s pretty
complete.

I think we wanted to move to apache 2, but we just hadn’t gotten a stable
version. Also, the binary mysql was something I thought we were putting in, is
it not?

I always thought Apache 2.X was far more stable on Windows because it
used the native threading model. I’ve never bothered with Apache 1.3
on Windows and always used 2.X and never had any stability issue, on
top of this Apache 2.X is far more easier to build on Windows than
Apache 1.3.

I fear that it will be too much duplication of effort to have two such projects
when they have similar goals. Our goal is to make it easy to get going, but
also to provide the tools for a usable production environment.

Perhaps a better solution is a better installer that can install only the
requested parts?

I dont want to duplicate your effort, I think this is 2 different
projects here. Instant rails should remain as it is, if you start
adding installer, different setup, etc… you’re going to confuse the
new comer and they wont know what to install to get up and running,
the nice front end to start everything is very clever and simple to
understand and use. The auto configuration is also quite cool.

What I’m trying to do here is just to provide the latest stable
binaries for someone who wants to deploy Rails. I dont intend to add a
GUI to start the system, neither to provide the auto config part. I
only bundle the binaries in an installer and it’s up to the user to do
all the configuration.

I think there’s room for both project here, am I wrong?

I haven’t looked at the license for the mysql admin program, is it ok to
distribute it bundled? That would indeed remove the need for php.

This is developped by the same guys who developped MySQL so I would
imagine that if you can bundle MySQL binaries you should be able to
bundle MySQL Query Browser.

Gael

David M. wrote:

Gael P. wrote:

In the latest version I’ve just downloaded (Version 1.0) Tcl/Tk was
still in it

1.1 just released… :wink:

At the very least, we may benefit from sharing a few things… I think
we want to move apache2 sometime.

hi i see you are releasing on SF soon, thats sounds exciting, you gave
me some pointers on my scgi endeavours with Ruby and Lighty, after
reading what has all gone in to your project i feel like trying to just
get ruby to run on lighty is a waste of time since when you have spent
all your time to combined such a nice set of tools all in one.
definately appreciate tools like this, now can’t wait for the release
date
charl

Gael P. wrote:

In the latest version I’ve just downloaded (Version 1.0) Tcl/Tk was
still in it

1.1 just released… :wink:

At the very least, we may benefit from sharing a few things… I think
we want to move apache2 sometime.

Hi all, just a quick note to let you know that I’ve just uploaded
version 0.1 of my Rails production system for Windows.

Basically it’s a bundle of the following software:
-Apache 2.2 with mod_ssl, mod_zlib, mod_fcgi, mod_scgi
-Ruby 1.8.4 with RubyGems 0.8.11
-Ruby native MySQL and MSSQL wrapper
-Rails 1.1

All built from Scratch on a Windows XP system using the latest stable
released of each software.

I’ve made a installer to ease the setup which let you choose what you
want to install and pre-configure the apache configuration files for
you with support for FCGI, SCGI and WEBRick.

I repeat, this isn’t a replacement for Instant Rails, it’s tailored to
production environment and doesn’t include MySQL or any of the goodies
that Instant Rails has, you still have to do a great deal of
configuration yourself. So if you start with Rails and want a nice and
easy development environment , you shouldn’t use this yet.

You can find it here:

I haven’t had time to explain how I’ve built each individual software
from scratch but that is next on my list. I also want to look at SVN
and Capistrano for next release.

Have fun…

Gael

Note to the Instant Rails team, I’m not trying to duplicate your work
here and I’m happy to share with you as much as I can to get the best
of breed installation kit for Rails on Windows, but I needed this kit
asap because we use it internally to deploy Rails system on the fly
and I thought I would just share it with the world because it did save
me some time and effort so I think it can help others.

Gael P. wrote:

released of each software.

Gael,

Great work! I'll set it up... hopefully I can make it work... Is

there anything that I need to change on the http.conf configuration that
I need to modify? Can you please just give a walk through after the
installation… like making a test rails app and how to get it up and
running… thanks! I like that fact that you use the latest stuff in the
installation. Thanks!

  • Erwin Q.

On 06/04/06, Gael P. [email protected] wrote:

You can find it here:
http://rails-prod-win.sourceforge.net/

For those of you who wonder why I didn’t use RubyForge:

It’s a rather big setup (10Meg so far, bound to grow) and I wanted to
benefit from the mirrors features of Sourceforge.

Gael

On 4/5/06, Gael P. [email protected] wrote:

Note to the Instant Rails team, I’m not trying to duplicate your work
here and I’m happy to share with you as much as I can to get the best
of breed installation kit for Rails on Windows, but I needed this kit
asap because we use it internally to deploy Rails system on the fly
and I thought I would just share it with the world because it did save
me some time and effort so I think it can help others.

Hey, no problem! Glad to see you doing this.

Curt

On 4/5/06, Gael P. [email protected] wrote:

On 06/04/06, Gael P. [email protected] wrote:

You can find it here:
http://rails-prod-win.sourceforge.net/

For those of you who wonder why I didn’t use RubyForge:

It’s a rather big setup (10Meg so far, bound to grow) and I wanted to
benefit from the mirrors features of Sourceforge.

RubyForge has mirrors, too. You just don’t get to select them as they
are automatically round-robined on each request.

Not that I encourage large packages on RubyForge, but I’ll point out
that the One-Click Installer is 21MB and Instant Rails is 49MB.

Curt

On 06/04/06, Curt H. [email protected] wrote:

On 4/5/06, Gael P. [email protected] wrote:
RubyForge has mirrors, too. You just don’t get to select them as they
are automatically round-robined on each request.

Not that I encourage large packages on RubyForge, but I’ll point out
that the One-Click Installer is 21MB and Instant Rails is 49MB.

I didnt know that, I guess it’s too late now :frowning:

Gael

good job , thanks for sharing.

2006/4/6, Gael P. [email protected]:

Hi all, just a quick note to let you know that I’ve just uploaded
version 0.1 of my Rails production system for Windows.

Hi Gael,

Thanks for your efforts, I’ll give a try soon.

What tool can be used to browse the installation package ?

I wanna know what kind of windows system files or Registry or Path
installer will impact. In others word how that installation would
change any working dev or production env.

Thanks again, that’s a very fine works for us.

Mathieu

On 06/04/06, Erwin Q. [email protected] wrote:

Great work! I'll set it up... hopefully I can make it work... Is

there anything that I need to change on the http.conf configuration that
I need to modify? Can you please just give a walk through after the
installation… like making a test rails app and how to get it up and
running… thanks! I like that fact that you use the latest stuff in the
installation. Thanks!

Hi Erwin

As I said in the email, this is not an Instant Rails replacement, i.e.
it assumes that you’ve already got a Rails application developped and
tested somewhere and you just want to deploy it on a production
machine, however you can use this setup to start a Rail application.
Install the kit and just create a new Rails application using “rails
appname”, follow instructions on RoR web site to setup DB etc…

The Installer asks you for a couple of parameters (ServerName,
AdminEmail, Document Root, if you want SSL enabled, if you want FCGI,
SCGI or just Proxying WEBRick) and set up httpd.conf and all the extra
Apache files located in conf/extra with those values.

If you then follow the Install.rtf that will tell you how to configure
the Rails application to talk to Apache. You may still need to edit
httpd.conf to tweak some of the values, this is only giving you the
base to start but you should know what you doing at this stage.

PS: I realised now that setting the Document Root in the installer via
a Folder Tree View isn’t probably the best way to go since most of the
time you wont have deployed you application before you install the
kit, especially if I include Capistrano in it. I will think of
something else, for now you’ll have to create a dummy directory that
will be your Rails application public directory so you can point to it
in the installer.

Gael

On Apr 2, 2006, at 12:21 AM, David M. wrote:

I think we wanted to move to apache 2, but we just hadn’t gotten a
stable
version. Also, the binary mysql was something I thought we were
putting in, is
it not?

My 0.02:

Please don’t put in MySQL or PHP. Keep it at Ruby (plus gems), Rails
and a web server (preferably allow us to choose between lighttpd,
Apache2, Webrick or Mongrel)

My vote is to build an installer that will default to lighttpd/rails
or mongrel/rails that can work with existing Apache2 and MySQL (or
PostgreSQL) installations.

There’s no reason to bundle in a database server given that they
install perfectly well already and require no configuration on the
Rails side (apart from having the requisite gems installed).

It may be even better to decouple this from Ruby and provide some
means of adding Rails to an existing Ruby installation …

– G.

On 06/04/06, Mathieu C. [email protected] wrote:

What tool can be used to browse the installation package ?

I’ve used Inno Setup to create the installer and I will post the
script as soon as I get a chance in CVS so everyone can have a look at
it.

I wanna know what kind of windows system files or Registry or Path
installer will impact. In others word how that installation would
change any working dev or production env.

This is a fairly good comment, I usually dont like Installer either
because I’m never sure what they do in the background but I have to
admit that they save me time because I can preset some values
depending on path etc…

This is what the installer does:

-Unzip Apache, Ruby and all the tools in the directory you’ve choosen
in the setup

-No DLLs/Files are copied in any other directories (Windows, System,
etc…), all the DLLs/Files needed for the application are in the
respective folders of the application (e.g. ruby/bin, httpd/bin,
etc…), this may result in a duplication of DLLs (openssl, zlib and
Iconv) but I’d rather do this than have DLLs all over the system
overriding existing DLLs, and that way I make sure the application
uses the DLLs I want them to use, not some old DLLs left over by Joe
Blogg latest freeware.

-All the application are linked againt the latest MSVC Studio 7.1
runtime library (i.e. MSVCP71.dll and MSVCR71.dll) which are also
installed in the application directory, However I’ve just noticed that
these 2 DLLs aren’t in the Apache bin directory so unless you have
them already or add Ruby bin directory in the PATH, Apache will not
start.

-If you choose to Install Apache as a service and add Ruby to the
Path, the Installer will run “httpd\bin\httpd -k install” to install
Apache as a service, and it will add Ruby bin directory in the
ENV[PATH] using the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment\Path

-Some entries are added to the Start Menu

-No file associations or INI files are changed/added/removed

When you remove the application, it will try its best to remove all
the files from the install directory, however it will leave any new
files you have added since the install, It will uninstall Apache
service and remove Ruby bin directory from the Path variable.

That’s all

Hope that’s what you after.

Gael

On 11/04/06, Guido S. [email protected] wrote:

My 0.02:

Please don’t put in MySQL or PHP. Keep it at Ruby (plus gems), Rails
and a web server (preferably allow us to choose between lighttpd,
Apache2, Webrick or Mongrel)

My vote is to build an installer that will default to lighttpd/rails
or mongrel/rails that can work with existing Apache2 and MySQL (or
PostgreSQL) installations.

I couldn’t get Lightty on Windows to work with anything other than
Mongrel using mod_proxy, mod_fastcgi and mod_scgi never worked for me,
not sure why but I gave up, I dont think Lighttpd is very well suited
on Windows yet, it’s missing Win32 service for example.

Lightty seems to have the same “cool” effect as Textmate these days,
if you dont use Textmate to develop in Rails and dont use Lightty to
host Rails you’re old fashion…
I think I’ve read several time that Lightty was no better than Apache
performance wise especially on Windows.

There’s no reason to bundle in a database server given that they
install perfectly well already and require no configuration on the
Rails side (apart from having the requisite gems installed).

Totally agree with this…

Gael

Lightty seems to have the same “cool” effect as Textmate these days,
if you dont use Textmate to develop in Rails and dont use Lightty to
host Rails you’re old fashion…
I think I’ve read several time that Lightty was no better than Apache
performance wise especially on Windows.

Yeah, well, that’s what you get for working on Windows :wink: :slight_smile:

Best regards

Peter De Berdt

On 11/04/06, Peter De Berdt [email protected] wrote:

Lightty seems to have the same “cool” effect as Textmate these days,
if you dont use Textmate to develop in Rails and dont use Lightty to
host Rails you’re old fashion…
I think I’ve read several time that Lightty was no better than Apache
performance wise especially on Windows.

Yeah, well, that’s what you get for working on Windows :wink: :slight_smile:

Yeah, well, you dont get choose what you customer wants :frowning: , it’s
good enough when you can persue them no to use IIS…

On 11 Apr 2006, at 19:30, Gael P. wrote:

Yeah, well, you dont get choose what you customer wants :frowning: , it’s
good enough when you can persue them no to use IIS…

I was just joking around, but I know your pain, believe me.

Best regards

Peter De Berdt