Hi, Just finished the TODO tutorial... thanks Vincent for the excellent job. Are there any opensource rails apps that I can go through to learn more about advanced features? Coming from the Java world the best example is AppFuse which gives a lot of functionality out of the box (Login, decoration, menuing...). I''m learning Ruby through Rails, maybe not the best way... so examples would really help. My second question is about WEBrick, it seems to be really slow on Windows XP when working on this tutorial. I''m using SQLite but I dont think that''s the problem. Any ideas how to speed it up? Thanks, Abdullah
Look at the Demo Apps here: http://rubyonrails.org/show/DemoApps Most of them have source code to look through. They''ll help out a lot. And as to WEBrick, I''ve never used it ... but you should set up Apache. It really isn''t that hard. Watch the video here: http://www.leetsoft.com/rails/lesson3.html to set it up on Windows. I can''t speak to how well it works though, because I''ve never used Rails on Windows. Let me know how that works. Apache with mod_ruby of fcgi should be fast enough. On Thu, 25 Nov 2004 09:45:38 -0800 (PST), Abdullah Jibaly <amjibaly-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > Just finished the TODO tutorial... thanks Vincent for > the excellent job. Are there any opensource rails apps > that I can go through to learn more about advanced > features? Coming from the Java world the best example > is AppFuse which gives a lot of functionality out of > the box (Login, decoration, menuing...). I''m learning > Ruby through Rails, maybe not the best way... so > examples would really help. > > My second question is about WEBrick, it seems to be > really slow on Windows XP when working on this > tutorial. I''m using SQLite but I dont think that''s the > problem. Any ideas how to speed it up? > > Thanks, > Abdullah > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
> Just finished the TODO tutorial... thanks Vincent for > the excellent job. Are there any opensource rails apps > that I can go through to learn more about advanced > features? Coming from the Java world the best example > is AppFuse which gives a lot of functionality out of > the box (Login, decoration, menuing...). I''m learning > Ruby through Rails, maybe not the best way... so > examples would really help.There is plenty here http://www.rubyonrails.org/show/DemoApps> My second question is about WEBrick, it seems to be > really slow on Windows XP when working on this > tutorial. I''m using SQLite but I dont think that''s the > problem. Any ideas how to speed it up?Yeah, that''s right. I usually work with Cygwin, but this is even slower. 1-2 Seconds for every refresh. Now I have www.colinux.org installed and use Debian inside of it. It is actually faster than pure Windows or Windows/Cygwin (wich is very peculiar). Of course, only if you plan on investing 2-3 days to set everything up, you should consider using it. And if you are familiar with Linux. Greets Sascha Ebach
> And as to WEBrick, I''ve never used it ... but you should set up> Apache. It really isn''t that hard. Watch the video here: > http://www.leetsoft.com/rails/lesson3.html to set it up on Windows. I > can''t speak to how well it works though, because I''ve never used Rails > on Windows. Let me know how that works. Apache with mod_ruby of fcgi > should be fast enough. I would recommend against it for the development environment. You will loose the Save / Referesh ability. Sascha
Okay, thanks for bringing that up. I was wondering what that means, because when I set up Apache with mod_ruby, every change I made to the code or the database was automatically and instantly available on my Rails app. So I couldn''t figure out what people meant by that Save/Refresh thing. What is the difference between CGI and mod_ruby? I couldn''t determine one. SEAN On Thu, 25 Nov 2004 19:01:47 +0100, Sascha Ebach <se-eFwX6J65rk9VioaHkBSlcw02NpfuEekPhC4ANOJQIlc@public.gmane.org> wrote:> > And as to WEBrick, I''ve never used it ... but you should set up > > Apache. It really isn''t that hard. Watch the video here: > > http://www.leetsoft.com/rails/lesson3.html to set it up on Windows. I > > can''t speak to how well it works though, because I''ve never used Rails > > on Windows. Let me know how that works. Apache with mod_ruby of fcgi > > should be fast enough. > > I would recommend against it for the development environment. You will > loose the Save / Referesh ability. > > Sascha > _______________________________________________ > > > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Sean Schulte wrote:> Okay, thanks for bringing that up. I was wondering what that means, > because when I set up Apache with mod_ruby, every change I made to the > code or the database was automatically and instantly available on my > Rails app. So I couldn''t figure out what people meant by that > Save/Refresh thing. What is the difference between CGI and mod_ruby? I > couldn''t determine one.Should be clear by reading this: http://www.rubyonrails.org/show/ProductionEnvironments Funny that you say that all your changes are instant. This shouldn''t be the case with mod_ruby or FastCGI. I know that mod_ruby has a file called "auto-reload.rb". Maybe you are using it? Do you actually use mod_ruby with Apache / Win32? Sascha
* Sean Schulte <sirsean-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> [1154 17:54]:> Look at the Demo Apps here: http://rubyonrails.org/show/DemoApps > Most of them have source code to look through. They''ll help out a lot.I found that this morning - is it me or are a lot of the links broken? Either 500s or the ''running on rails'' _doc/index.html thing... (though I was going to clone del.icio.us using Rails to get up to speed, and ''yerlinks'' seems to be halfway there, so mustn''t grumble...)> And as to WEBrick, I''ve never used it ... but you should set up > Apache. It really isn''t that hard. Watch the video here: > http://www.leetsoft.com/rails/lesson3.html to set it up on Windows. I > can''t speak to how well it works though, because I''ve never used Rails > on Windows. Let me know how that works. Apache with mod_ruby of fcgi > should be fast enough.Speaking of speed, does anyone have a benchmark tool they use to measure performance? I normally use ''ab'' but it doesn''t support SSL, and siege doesn''t do basic auth. I''m resorting to ''that *feels* about 5 times faster'', which isn''t ideal..... -- Oh how awful. Did he at least die peacefully? ....To shreds you say, tsk tsk tsk. Well, how''s his wife holding up? ....To shreds, you say... - Prof. Farnsworth Rasputin :: Jack of All Trades - Master of Nuns
Maybe it is using some kind of auto-reload.rb business, but if it is it happened automatically, without me setting it up. And no, I run mod_ruby with Apache on FreeBSD and OS X. The only Windows machine I have available is dual booting on a laptop somewhere that only gets used for testing. I really have nothing to say about its behavior/performance on Windows, as I haven''t tried to use it. On Thu, 25 Nov 2004 19:22:33 +0100, Sascha Ebach <se-eFwX6J65rk9VioaHkBSlcw02NpfuEekPhC4ANOJQIlc@public.gmane.org> wrote:> Sean Schulte wrote: > > Okay, thanks for bringing that up. I was wondering what that means, > > because when I set up Apache with mod_ruby, every change I made to the > > code or the database was automatically and instantly available on my > > Rails app. So I couldn''t figure out what people meant by that > > Save/Refresh thing. What is the difference between CGI and mod_ruby? I > > couldn''t determine one. > > Should be clear by reading this: > http://www.rubyonrails.org/show/ProductionEnvironments > > Funny that you say that all your changes are instant. This shouldn''t be > the case with mod_ruby or FastCGI. I know that mod_ruby has a file > called "auto-reload.rb". Maybe you are using it? > > Do you actually use mod_ruby with Apache / Win32? > > > > Sascha > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
FWIW, I took my rails app from Windows and put it on my Linux partition, and the speed doubled (still using webrick in development mode). Also, if you''re looking to kick the crap out your web app in SSL mode, look at siege, it might be useful (http://www.joedog.org/siege/index.php). # steve On Thu, 25 Nov 2004 12:27:38 -0600, Sean Schulte <sirsean-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Maybe it is using some kind of auto-reload.rb business, but if it is > it happened automatically, without me setting it up. And no, I run > mod_ruby with Apache on FreeBSD and OS X. The only Windows machine I > have available is dual booting on a laptop somewhere that only gets > used for testing. I really have nothing to say about its > behavior/performance on Windows, as I haven''t tried to use it. > > On Thu, 25 Nov 2004 19:22:33 +0100, Sascha Ebach > > > <se-eFwX6J65rk9VioaHkBSlcw02NpfuEekPhC4ANOJQIlc@public.gmane.org> wrote: > > Sean Schulte wrote: > > > Okay, thanks for bringing that up. I was wondering what that means, > > > because when I set up Apache with mod_ruby, every change I made to the > > > code or the database was automatically and instantly available on my > > > Rails app. So I couldn''t figure out what people meant by that > > > Save/Refresh thing. What is the difference between CGI and mod_ruby? I > > > couldn''t determine one. > > > > Should be clear by reading this: > > http://www.rubyonrails.org/show/ProductionEnvironments > > > > Funny that you say that all your changes are instant. This shouldn''t be > > the case with mod_ruby or FastCGI. I know that mod_ruby has a file > > called "auto-reload.rb". Maybe you are using it? > > > > Do you actually use mod_ruby with Apache / Win32? > > > > > > > > Sascha > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Make sure you guys use rubyw.exe from the ruby win distribution and not ruby.exe. ruby.exe is notoriously slow. The next release of rails will make development enviroments run a couple orders of magnitude faster since you will be able to develop using fastcgi and webrick got some major changes so it actually performs a lot faster than current apache /cgi mode. On Thu, 25 Nov 2004 13:35:05 -0500, Steve Kellock <skellock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> FWIW, > > I took my rails app from Windows and put it on my Linux partition, and > the speed doubled (still using webrick in development mode). > > Also, if you''re looking to kick the crap out your web app in SSL mode, > look at siege, it might be useful > (http://www.joedog.org/siege/index.php). > > # steve > > > > > On Thu, 25 Nov 2004 12:27:38 -0600, Sean Schulte <sirsean-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Maybe it is using some kind of auto-reload.rb business, but if it is > > it happened automatically, without me setting it up. And no, I run > > mod_ruby with Apache on FreeBSD and OS X. The only Windows machine I > > have available is dual booting on a laptop somewhere that only gets > > used for testing. I really have nothing to say about its > > behavior/performance on Windows, as I haven''t tried to use it. > > > > On Thu, 25 Nov 2004 19:22:33 +0100, Sascha Ebach > > > > > > <se-eFwX6J65rk9VioaHkBSlcw02NpfuEekPhC4ANOJQIlc@public.gmane.org> wrote: > > > Sean Schulte wrote: > > > > Okay, thanks for bringing that up. I was wondering what that means, > > > > because when I set up Apache with mod_ruby, every change I made to the > > > > code or the database was automatically and instantly available on my > > > > Rails app. So I couldn''t figure out what people meant by that > > > > Save/Refresh thing. What is the difference between CGI and mod_ruby? I > > > > couldn''t determine one. > > > > > > Should be clear by reading this: > > > http://www.rubyonrails.org/show/ProductionEnvironments > > > > > > Funny that you say that all your changes are instant. This shouldn''t be > > > the case with mod_ruby or FastCGI. I know that mod_ruby has a file > > > called "auto-reload.rb". Maybe you are using it? > > > > > > Do you actually use mod_ruby with Apache / Win32? > > > > > > > > > > > > Sascha > > > _______________________________________________ > > > Rails mailing list > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Tobi http://blog.leetsoft.com
Tobias Luetke wrote:> Make sure you guys use rubyw.exe from the ruby win distribution and > not ruby.exe. ruby.exe is notoriously slow.Oh, I didn''t know that. Thx. Is the reason for this documented somewhere? Or is it just personal experience?> The next release of rails will make development enviroments run a > couple orders of magnitude faster since you will be able to develop > using fastcgi and webrick got some major changes so it actually > performs a lot faster than current apache /cgi mode.nice! -- Sascha Ebach
Dick Davies wrote:> Speaking of speed, does anyone have a benchmark tool they use > to measure performance? I normally use ''ab'' but it doesn''t support > SSL, and siege doesn''t do basic auth. I''m resorting to ''that *feels* > about 5 times faster'', which isn''t ideal.....Florian Weber was to do a benchmark suite. But it seems like there is nothing going on. Maybe he has no time at the moment? http://www.rubyonrails.org/show/BenchmarkSuiteWish would be great to have something like that. -- Sascha Ebach
Personal expirience, But when i integrated ruby into scite i noticed that it spawned a console window every time i pressed f5, not so with rubyw.exe. I hope at some point we will be able to compile ruby on windows with the now free microsoft compilers. Then windows should see equal or better performance than linux. I think the biggest windows problem is startup times because ruby has to setup a posix subsystem for every start ugg. Obviously this kills rails performance as a new ruby interpreter is started for every request. But as i said, this is going to change next release. On Thu, 25 Nov 2004 20:49:15 +0100, Sascha Ebach <se-eFwX6J65rk9VioaHkBSlcw02NpfuEekPhC4ANOJQIlc@public.gmane.org> wrote:> Tobias Luetke wrote: > > Make sure you guys use rubyw.exe from the ruby win distribution and > > not ruby.exe. ruby.exe is notoriously slow. > > Oh, I didn''t know that. Thx. Is the reason for this documented > somewhere? Or is it just personal experience? > > > The next release of rails will make development enviroments run a > > couple orders of magnitude faster since you will be able to develop > > using fastcgi and webrick got some major changes so it actually > > performs a lot faster than current apache /cgi mode. > > nice! > > -- > Sascha Ebach > _______________________________________________ > > > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Tobi http://blog.leetsoft.com
On Friday, November 26, 2004, 6:18:27 AM, Tobias wrote:> Make sure you guys use rubyw.exe from the ruby win distribution and > not ruby.exe. ruby.exe is notoriously slow.> The next release of rails will make development enviroments run a > couple orders of magnitude faster since you will be able to develop > using fastcgi and webrick got some major changes so it actually > performs a lot faster than current apache /cgi mode.Can you explain the changes that are being made? How can FastCGI be a development environment? How can Webrick be made to go faster? Just for interest''s sake. Gavin
3kru-hpyd-5+VhGm8TZF7QT0dZR+AlfA@public.gmane.org
2004-Nov-26 02:20 UTC
Re: Rails examples
I run Webrick in "cached mode" (I forget the exact name, I don''t have it in front of me) which runs very fast for me (on Windows XP and Windows Server 2003). The only problem is that you have to kill Webrick every time you change the code (I kill the process because Ctrl-C/Ctrl-Break doesn''t work). I actually prefer the extra step of having to stop and start Webrick because I get so much greater speed. If you run Webrick in its normal mode, it has to load up an instance of Ruby every time you do something in your web app (click a link, click a button, etc). I also have Webrick (my personal wiki on Instiki) running as a service using FireDaemon, so you can just click the restart button on the service or use a single batch file to stop and start the service every time you want to change the code. I haven''t tried to get FastCGI running yet (again, on Windows), but I had enough problems just getting normal CGI running (this was before Tobias'' tutorial) and since Webrick performs so well, I''ve had no reason so far. And Apache CGI is as slow as Webrick in non-cached mode (at least for me) -- it basically has to fire up a new Ruby every time. I will, however, be checking to see if i am NOT using rubyw. I thought when you invoked "ruby" on Windows you were actually running a batch file that runs rubyw.exe, but I''ll have to check. My $0.0279 NZD --John On Fri, 26 Nov 2004 12:13:40 +1100, Gavin Sinclair <gsinclair-81uBx+iSpXA0n/F98K4Iww@public.gmane.org> wrote:> * Replies will be sent through Spamex to rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > * For additional info click -> http://www.spamex.com/i/?v=4990968 > > On Friday, November 26, 2004, 6:18:27 AM, Tobias wrote: > > > Make sure you guys use rubyw.exe from the ruby win distribution and > > not ruby.exe. ruby.exe is notoriously slow. > > > The next release of rails will make development enviroments run a > > couple orders of magnitude faster since you will be able to develop > > using fastcgi and webrick got some major changes so it actually > > performs a lot faster than current apache /cgi mode. > > Can you explain the changes that are being made? How can FastCGI be a > development environment? How can Webrick be made to go faster? Just > for interest''s sake. > > Gavin > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Gavin Sinclair wrote:> Can you explain the changes that are being made? How can FastCGI be a > development environment? How can Webrick be made to go faster? Just > for interest''s sake.The framework will reload any models and controllers used (rather than using ''require'') so any changes made to the code will be seen, but without having to restart the interpreter, reparse all the framework and library code, or re-establish the database connection. This makes "development mode" almost as fast as production FCGI or webrick -c, as opposed to developing against CGI or restarting the server on every change to the code. This feature can be turned off for the production installation proper, to get the maximum speed. Tim. -- Tim Bates tim-kZbwfhiKUx26c6uEtOJ/EA@public.gmane.org
On Friday, November 26, 2004, 4:31:11 PM, Tim wrote:> Gavin Sinclair wrote: >> Can you explain the changes that are being made? How can FastCGI be a >> development environment? How can Webrick be made to go faster? Just >> for interest''s sake.> The framework will reload any models and controllers used (rather than > using ''require'') so any changes made to the code will be seen, but > without having to restart the interpreter, reparse all the framework and > library code, or re-establish the database connection. This makes > "development mode" almost as fast as production FCGI or webrick -c, as > opposed to developing against CGI or restarting the server on every > change to the code. This feature can be turned off for the production > installation proper, to get the maximum speed.Heh, so obvious, now that someone else has thought of it :) Gavin
Hi Tim, Tim Bates wrote:> The framework will reload any models and controllers used (rather than > using ''require'') so any changes made to the code will be seen, but > without having to restart the interpreter, reparse all the framework and > library code, or re-establish the database connection. This makes > "development mode" almost as fast as production FCGI or webrick -c, as > opposed to developing against CGI or restarting the server on every > change to the code. This feature can be turned off for the production > installation proper, to get the maximum speed.That sounds great. That is what Cerise does. When I used Cerise I ran into a problem though. When using Constants within your code you cannot redefine them. Since the code only gets reevaluated. Did you fin any solution to that? -- Sascha Ebach
> That sounds great. That is what Cerise does. When I used Cerise I ran > into a problem though. When using Constants within your code you > cannot redefine them. Since the code only gets reevaluated. Did you > fin any solution to that?You do redefine them, but you get a warning for doing so. One way to go is by turning all constants into methods. That''s how they''d do it in Smalltalk ;) -- David Heinemeier Hansson, http://www.basecamphq.com/ -- Web-based Project Management http://www.rubyonrails.org/ -- Web-application framework for Ruby http://macromates.com/ -- TextMate: Code and markup editor (OS X) http://www.loudthinking.com/ -- Broadcasting Brain