Recommend server for developing RoR on win


#1

Hi all,
can you recommend me which web server config to use for developing rails
on windows machine. I tried webrick, which is good but it’s annoying
because console window is in taskbar for every site running and it have
to be started manually. Apache with CGI is to slow and using FastCGI on
the other side brings me lot of problems, like randomly not working RoR
sites.
Any help is appreciated.

Thanx,
Bojan


Bojan M.
Informatika Mihelac, Bojan M. s.p. | www.informatikamihelac.com
-> tools, scripts, tricks from our code lab: http://source.mihelac.org


#2

There are some great essays on the topic: http://duncandavidson.com/

 Erik.

Bojan M. schreef:


#3

Hi, Bojan,

give SCGI with Apache VirtualHosts a try. I’m runnning this on Server
2003 with good results. A search on http://www.ruby-forum.com or the
gmane archives of this mailing list would help.

Regards
Jan


#4

Instantrails 1.0 supports SCGI and Apache out of the box. It works
pretty well, but you still get the console window for the SCGI server.

If you ask Curt nicely he might be able to setup InstantRails to use
rubyw.exe instead of ruby.exe to run the server scripts. That would
hide the windows, but you would probably need to use the task manager to
kill the processes when you didn’t need them anymore.

_Kevin


#5

Kevin O. wrote:

Thanks for both answers. I have already Apache and MySql installed with
bunch of apps and sites running so I would like to avoid double
processes. I am curently evaluating SCGI solution and would post here
how it is going. I would not like to learn working with any more apps if
it is not really needed - the Ruby and RoR are enough :slight_smile:


Bojan M.
Informatika Mihelac, Bojan M. s.p. | www.informatikamihelac.com
-> tools, scripts, tricks from our code lab: http://source.mihelac.org


#6

Hi Jan.
Thanks for answer.
I tried with SCGI following instructions from
www.zedshaw.com/projects/scgi_rails/.
However when I start service, for http://127.0.0.1:9999/ I receive blank
page and scgi.log adds “[ERR][5456] Malformed request, does not end with
‘,’”. When config for Apache2 is added then the error is: Recognition
failed for “/” in routing.rb.

Did you have to change .htaccess or some other file in Rails application
directory? Any advice?

Bojan


#7

Try RadRails!

It gives you not only a great development Interface (yes, it is an IDE)
but
also ways to start/stop as many webrick instances as you want (for one
or
more projects) and it also provides simpler ways to run generators,
etc…

Rubists don’t like IDE’s, but that is mostly prejudice. RadRails is a
nice
IDE for Ruby.
You can do everything from the IDE: running generators, launching
webrick,
browsing your app and dealing with CVS or SVN. For browsing I prefer
Firefox, though.

Regards,

Marcelo Bello


#8

Bojan,

Are you by chance running rails with SCGI on port 9999 and then trying
to access your application on port 9999 with your web browser directly?

If so then think for a few minutes. Your browser understands HTTP
right? SCGI is running on 9999. SCGI is not HTTP. Think. What
happens when you tell your browser to go to port 9999? Does it use
HTTP? Probably. Does SCGI understand HTTP? Not at all.

Try going to the port your web server is on with your web browser.

Zed A. Shaw

On Wed, 11 Jan 2006 17:23:30 +0100


#9

Thanks for answer Zed. Yes, it was not very smart move, I was desperate
with “Routing Error \n Recognition failed for “/”” errors (and many
others I received in last days) so I tried talking to SCGI like its
WebRick server :slight_smile:
This is my config in Apache2 (commented are commands for FCGI which I at
last get it working ok)

</LocationMatch>
#AddHandler cgi-script .cgi
#AddHandler fastcgi-script .fcgi

#

and these is scgi.yaml in config folder

:host: 127.0.0.1
:password: yGaY8/ZiZcmsQ
:port: 9999
:logfile: log/scgi.log
:config: config/scgi.yaml
:control_url: druby://127.0.0.1:8999
:disable_signals: true
:env: development
Maybe you can see what’s wrong there, it’s seems everything is ok.

best regards,
Bojan


#10

Hi, Bojan,

looks not so bad indeed. Haven’t used it for quite some time (using
webrick for development myself) but this is one configuration that
definitly has worked. Not much different. Would you try to take the
quotes of the DocumentRoot?

Regards
Jan

<VirtualHost *:8080>
AddDefaultCharset utf-8
ServerName www.blauton.de
DocumentRoot f:/home/jan/workspace/blauton/public/
ErrorDocument 500 /500.html
ErrorDocument 404 /404.html
# handle all requests throug SCGI
SCGIMount / 127.0.0.1:9999
# matches locations with a dot following at least one more
characters, that is, things like *,html, *.css, *.js, which should be
delivered directly from the filesystem
<LocationMatch …+$>
# don’t handle those with SCGI
SCGIHandler Off

<Directory f:/home/jan/workspace/blauton/public/>
Options +FollowSymLinks
Order allow,deny
allow from all


:host: 127.0.0.1
:password: ###
:port: 9999
:logfile: log/scgi.log
:config: config/scgi.yaml
:control_url: druby://127.0.0.1:8999
:disable_signals: true
:env: development


#11

Hi Jan,
all same without quotes. Should do clean install of apache/mysql/scgi to
see where the problem is.

best,
Bojan

Jan P. wrote:

<VirtualHost *:8080>
<LocationMatch …+$>

ServerName rails.bojan
allow from all
and these is scgi.yaml in config folder

to access your application on port 9999 with your web browser directly?

However when I start service, for http://127.0.0.1:9999/ I receive

Bojan M. wrote:

Any help is appreciated.

Rails mailing list
Bojan M.


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails


Bojan M.
Informatika Mihelac, Bojan M. s.p. | www.informatikamihelac.com
-> tools, scripts, tricks from our code lab: http://source.mihelac.org