I have spent must of the last three weekends trying to get Rails to work First on Windows, then on Mandrake Linux. Then back on Windows. What I have discovered.... Any slight miss-typed URL and you often get a 500 error from apache2 Rails is installed with a tmp directory missing, and no documentation explaining that it shoudll be created, nor where. It is also installed to produce an error saying tempdir already defined, on every use of a rail script, even after the missing directory has been created. This tmp directory fills up with old session files that are left on the machine permanently. Scallfold simply does not work - all links it genereates are "list" links. If scaffold did work it would be open to scripting attacks. rails is terribly terribly terribly slow without mod-ruby even with fastCGI and mod-ruby does not install on apache2 The "new" URL generates a data entry screen - but the data does NOT get to the datbase when you submit it. The "Edit" URL produces an error about a missing method. The "index" URL produces an error report that nil is missing the each: method. Ther errors you generate if the MySQL installation cannot be reached are very missleading. Rails appears very dependent upon the DNS/hosts settings, which must be perfect. (Until rails I used DNS from my firewall without configuration, errors or problems for the last 20 months). Rails and apache2 are very hard to get to work together on windows, and have proved impossible on Mandrake 10.1. gems will not let you step back to a previous version of a gem if the current one is unsuitable. Nor will gems omit an update you do not want. The "congratulations - your on rails" screen, means nothing - it is produced without using rails at all, just redirection. Rails is still so "pre 1.0" that formats, layouts and URL conversions have not settled down and may be changed on a whim. FastCGI and mod-ruby are installed (under windows) into the wrong directory on the wrong drive! Many errors that Linux manages to produce look like permissions problems - but remain even if you chmod the files to 777. My conclusion is clear. I really do hope my experience is not typical. Ruby is a tremendous language (I have ised it lightly for 6 months) and rails held such promise - I am very disappointed. Regards Ian
Ian Hobson wrote:>I have spent must of the last three weekends trying to get Rails to work > >First on Windows, then on Mandrake Linux. Then back on Windows. > >What I have discovered.... > >Any slight miss-typed URL and you often get a 500 error from apache2 >Rails is installed with a tmp directory missing, and no documentation >explaining that it shoudll be created, nor where. It is also installed to >produce an error saying tempdir already defined, on every use of a rail >script, even after the missing directory has been created. >This tmp directory fills up with old session files that are left on the >machine permanently. >Scallfold simply does not work - all links it genereates are "list" links. >If scaffold did work it would be open to scripting attacks. >rails is terribly terribly terribly slow without mod-ruby even with fastCGI >and mod-ruby does not install on apache2 >The "new" URL generates a data entry screen - but the data does NOT get to the >datbase when you submit it. >The "Edit" URL produces an error about a missing method. >The "index" URL produces an error report that nil is missing the each: method. >Ther errors you generate if the MySQL installation cannot be reached are very >missleading. >Rails appears very dependent upon the DNS/hosts settings, which must be >perfect. (Until rails I used DNS from my firewall without configuration, >errors or problems for the last 20 months). >Rails and apache2 are very hard to get to work together on windows, and have >proved impossible on Mandrake 10.1. >gems will not let you step back to a previous version of a gem if the current >one is unsuitable. Nor will gems omit an update you do not want. >The "congratulations - your on rails" screen, means nothing - it is produced >without using rails at all, just redirection. >Rails is still so "pre 1.0" that formats, layouts and URL conversions have not >settled down and may be changed on a whim. >FastCGI and mod-ruby are installed (under windows) into the wrong directory on >the wrong drive! >Many errors that Linux manages to produce look like permissions problems - but >remain even if you chmod the files to 777. > >My conclusion is clear. I really do hope my experience is not typical. > >Ruby is a tremendous language (I have ised it lightly for 6 months) and rails >held such promise - I am very disappointed. > >Regards > >Ian >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > >I have rails running on windows with apache no problem. I also have an OS X install and a FreeBSD install working flawlessly. Scaffolding works just fine and most of the other problems you seem to be having are not things I have encountered. The security risk part has already been addressed on this list quite exhaustively. I am sorry that you seem to be having such a hard time but this post feels very trollish. If you want help getting rails working to your satisfaction I really recommend that you post some specific questions here or in the irc channel, the people in the rails community are great about helping with config and programming questions but you have ask before we can do anything for you. -Matthew Margolis
> >I have spent must of the last three weekends trying to get Rails to workI''ve only spent 7 hours on it [1][2] :) And all my frustrations come from not owning the box I''m trying to run on (i.e. shared host). When I own the box, the only problems I''ve had are the sessions in the temp directory. But I''ve got a cron that cleans those out. WEBrick is slower but then again it is 100% ruby. But it works great for embedding where you only expect a few hits a second. But other than those 2 (and the issues I had last night and this morning), I''ve had none of the problems you mention (include Apache2 on Windows - as long as I own the box :) [1] http://seagecko.org/thoughts/rails-rocks-and-sucks/ [2] http://seagecko.org/thoughts/rails-no-joy/ -- Justin Rudd http://seagecko.org/thoughts/
> Any slight miss-typed URL and you often get a 500 error from apache2This is why you create custom error pages for your users and check the logs if you''re in development mode. With webrick you get marginally more descriptive errors in some cases for development. You can catch most things that become 500''s in the controller code and process on the errors. The default just happens to drop them to the server.> Rails is installed with a tmp directory missing, and no documentation > explaining that it shoudll be created, nor where. It is also installed to > produce an error saying tempdir already defined, on every use of a rail > script, even after the missing directory has been created.This is probably a windows issue. A quick look at the logs is generally prescriptive for dealing with these sorts of things. I have not had issues with this on OS X, linux or BSD. In any case, on the IRC channel you''ll find half a dozen people, undoubtably, ready to help you fix it.> This tmp directory fills up with old session files that are left on the > machine permanently.If that''s a problem, there is information in the wiki on moving the sessions into the database. I believe if you call the delete method on a session object it should go away, leaving it in the developer''s control when it gets deleted.> Scallfold simply does not work - all links it genereates are "list" links.Most people have no problems with it. Are you perhaps mixing generated scaffolds with the scaffold classmethod?> If scaffold did work it would be open to scripting attacks.If you''d read the mailing list, you''d know that this is being addressed/discussed very actively.> rails is terribly terribly terribly slow without mod-ruby even with fastCGIIt''s not meant to be run as CGI or even really on webrick. Many fastcgi rails sites accept heavy loads with no trouble. Are you sure you changed .htaccess to point to dispatch.fcgi and your "fascgi is slow" didn''t come from running with dispatch.cgi as your dispatcher? Also are you sure you were not in development mode? Things like class reloading are enabled and caching is disablled in development mode. I find that production mode is visibly faster, at the expense of less explicit error reporting and restarts on code modification.> and mod-ruby does not install on apache2This is unrelated to rails. Most rails sites use fcgi, and this is the most recommended solution. IIRC basecamp uses mod_ruby, though I don''t know which apache version they have. Of course, Textdrive has mod_ruby and apache2 so it does install for someone.> The "new" URL generates a data entry screen - but the data does NOT get to the > datbase when you submit it. > The "Edit" URL produces an error about a missing method. > The "index" URL produces an error report that nil is missing the each: method.This falls in with your scaffold problems. You''re probably doing something wrong. I highly doubt that rails scaffolding is broken since it is one of the most heavily used pieces of code out there.> Ther errors you generate if the MySQL installation cannot be reached are very > missleading.Are you checking the apache error log and the development.log rails log? They''ve always pretty clearly indicated what was going on.> Rails appears very dependent upon the DNS/hosts settings, which must be > perfect. (Until rails I used DNS from my firewall without configuration, > errors or problems for the last 20 months).The only time I''ve ever experienced anything like this is when my fcgi install was broken and ServerName did odd things. I''ve run rails with and without DNS, on IP''s, on fake hostnames, and on internet hostnames with nothing more complex than a vhost container that was properly configured.> Rails and apache2 are very hard to get to work together on windows, and have > proved impossible on Mandrake 10.1. > gems will not let you step back to a previous version of a gem if the current > one is unsuitable. Nor will gems omit an update you do not want.Gem packages install themselves. Just download the old gem and run it. Gems is unrelated to rails and optional. Plenty of people are running rails on mandrake and windows with apache2 without these problems.> The "congratulations - your on rails" screen, means nothing - it is produced > without using rails at all, just redirection.I agree that this should be changed. It is misleading and has often led me to prematurely conclude that an app is properly configured.> Rails is still so "pre 1.0" that formats, layouts and URL conversions have not > settled down and may be changed on a whim.Yes it is pre-1.0. It is also production-ready as has been demonstrated by basecamp, tada, 43things, snowdevil, etc. Some things have not been nailed down yet, but the core developers always give the rails users warning and migration guides, and I''ve never spent more than 10-15 minutes making the neccesary changes. After 1.0, I assume this will settle down.> FastCGI and mod-ruby are installed (under windows) into the wrong directory on > the wrong drive!This is unrelated to rails.> Many errors that Linux manages to produce look like permissions problems - but > remain even if you chmod the files to 777.This indicates that those problems were not related to permissions.> My conclusion is clear. I really do hope my experience is not typical. > > Ruby is a tremendous language (I have ised it lightly for 6 months) and rails > held such promise - I am very disappointed. >I''m courteously assuming that you''re not a troll and that you actually want this to work. Your experience is very atypical which, in software, usually means that you''re doing something differently than everyone else. If you come to the IRC channel with your specific problems, people will work through it with you until it works. Part of the "documentation" for rails is the readily availabls support via IRC and this mailing list. I don''t recall you posting specifically about your problems here either, though I could easily have missed it. In any case good luck. If you want this to work, come to #rubyonrails and we''ll help you make it work. It is one of the most friendly and helpful IRC channels around. Regards, Brian
Brian L. wrote:> > > Scallfold simply does not work - all links it genereates are > "list" links. > > Most people have no problems with it. Are you perhaps mixing generated > scaffolds with the scaffold classmethod?I''ve seen this problem under one very specific circumstance. If you try to use RubyGems to install any version of Rails other than the latest version, you can get an incompatible mix of packages installed (through a combination of a RubyGem bug and the way the Rails gemspec is written). This happened to me when I tried to install rails 0.9.4 -- the symptoms were precisely what was reported above. Curt
> I have spent must of the last three weekends trying to get Rails to work > > First on Windows, then on Mandrake Linux. Then back on Windows.I had it up and running minutes after I decited to give it a try ( around version 0.6 ).> > What I have discovered.... > [...]Please file tickets or submit patches. -- Tobi http://www.snowdevil.ca - Snowboards that don''t suck http://www.hieraki.org - Open source book authoring http://blog.leetsoft.com - Technical weblog
Hi Brian, Thanks for your informative and helpful reply. (And you are right - I am not trolling, simply very disapointed that after two attempts to install and check out rails, I am still short of a working installation). On Monday 14 Feb 2005 00:23, Brian L. wrote:> > Any slight miss-typed URL and you often get a 500 error from apache2 > > This is why you create custom error pages for your users and check the > logs if you''re in development mode. With webrick you get marginally > more descriptive errors in some cases for development. You can catch > most things that become 500''s in the controller code and process on > the errors. The default just happens to drop them to the server. >I guess I made the tactical error in using apache and phpMyAdmin. I have used both products on my own and my ISP''s hardware for nearly two years, so they would be in any production environment, and (although no expert), I was familiar with them.> > Rails is installed with a tmp directory missing, and no documentation > > explaining that it shoudll be created, nor where. It is also installed to > > produce an error saying tempdir already defined, on every use of a rail > > script, even after the missing directory has been created. > > This is probably a windows issue. A quick look at the logs is > generally prescriptive for dealing with these sorts of things. I have > not had issues with this on OS X, linux or BSD. In any case, on the > IRC channel you''ll find half a dozen people, undoubtably, ready to > help you fix it.The logs showed me that /tmp was missing - but did not help to locate where it should be (in the root directory of the drive containing rails). Most logs were 100% empty, because I hadn''t got far enough to do anythign that might fill them.> > > This tmp directory fills up with old session files that are left on the > > machine permanently. > > If that''s a problem, there is information in the wiki on moving the > sessions into the database. I believe if you call the delete method on > a session object it should go away, leaving it in the developer''s > control when it gets deleted. >This is tuning for after the basic install works. I need to get there first.> > Scallfold simply does not work - all links it genereates are "list" > > links. > > Most people have no problems with it. Are you perhaps mixing generated > scaffolds with the scaffold classmethod? >I don''t think so. In another reply, Curt Hibbs has pointed out that he had the same problem with a specific combination of versions. Perhaps the answer is to remove rails, gem, and ruby on one machine and download them all afresh. (I thought I had done this on Mandrake - but thinking further, gems and Ruby are from 10.1 and may be too old)> > > rails is terribly terribly terribly slow without mod-ruby even with > > fastCGI > > It''s not meant to be run as CGI or even really on webrick. Many > fastcgi rails sites accept heavy loads with no trouble. Are you sure > you changed .htaccess to point to dispatch.fcgi and your "fascgi is > slow" didn''t come from running with dispatch.cgi as your dispatcher? > Also are you sure you were not in development mode? Things like class > reloading are enabled and caching is disablled in development mode. I > find that production mode is visibly faster, at the expense of less > explicit error reporting and restarts on code modification. >I don''t know what I did wrong. On my windows machine (2GHz AMD procesor with 1GB memory) windows performs well, apache on the non-rails apps is "instant". Rails requests take nearly 2 seconds to generate a simple reply, even those with no database access. A listing of two recipies can take 3 to 4 seconds. WEBrick is significantly faster than apache at rails - which makes me think there is something very strange going on.> > and mod-ruby does not install on apache2 > > This is unrelated to rails. Most rails sites use fcgi, and this is the > most recommended solution. IIRC basecamp uses mod_ruby, though I don''t > know which apache version they have. Of course, Textdrive has mod_ruby > and apache2 so it does install for someone. > > > The "new" URL generates a data entry screen - but the data does NOT get > > to the datbase when you submit it. > > The "Edit" URL produces an error about a missing method. > > The "index" URL produces an error report that nil is missing the each: > > method. > > This falls in with your scaffold problems. You''re probably doing > something wrong. I highly doubt that rails scaffolding is broken since > it is one of the most heavily used pieces of code out there. >Agreed. Which is why I pressed on with the Onlamp tutorials until I had the Categories table and model set up exactly, to the letter as in the tutorial. Then I knew it was not a typo in my source.> > The errors you generate if the MySQL installation cannot be reached are > > very missleading. > > Are you checking the apache error log and the development.log rails > log? They''ve always pretty clearly indicated what was going on.They said I did not have permission to log on. IPCHAINS was stopping Rails even reaching the MySQL server. Not a rails problem - just a problem I hit when trying to use rails.> > > Rails appears very dependent upon the DNS/hosts settings, which must be > > perfect. (Until rails I used DNS from my firewall without configuration, > > errors or problems for the last 20 months). > > The only time I''ve ever experienced anything like this is when my fcgi > install was broken and ServerName did odd things. I''ve run rails with > and without DNS, on IP''s, on fake hostnames, and on internet hostnames > with nothing more complex than a vhost container that was properly > configured. >My guess is that it is the interaction of apache2, DHCP, DNS and Vhosts that has caused my problems. The result is I broke phpMyAdmin while trying to get rails to play nice with my existing web apps, which I had moved to a virtual machine, and appear to work.> > Rails and apache2 are very hard to get to work together on windows, and > > have proved impossible on Mandrake 10.1. > > gems will not let you step back to a previous version of a gem if the > > current one is unsuitable. Nor will gems omit an update you do not want. > > Gem packages install themselves. Just download the old gem and run it. > Gems is unrelated to rails and optional. Plenty of people are running > rails on mandrake and windows with apache2 without these problems. > > > The "congratulations - your on rails" screen, means nothing - it is > > produced without using rails at all, just redirection. > > I agree that this should be changed. It is misleading and has often > led me to prematurely conclude that an app is properly configured. > > > Rails is still so "pre 1.0" that formats, layouts and URL conversions > > have not settled down and may be changed on a whim. > > Yes it is pre-1.0. It is also production-ready as has been > demonstrated by basecamp, tada, 43things, snowdevil, etc. Some things > have not been nailed down yet, but the core developers always give the > rails users warning and migration guides, and I''ve never spent more > than 10-15 minutes making the neccesary changes. After 1.0, I assume > this will settle down. >Curt Hibbs'' onlamp article ran into exactly this problem within days of publication. The URLs in the article are now wrong. There are comments following page 5 about the troubles people have had and Curt trying to remove old versions, and finding gems did not help in this. I am still not 100% sure I know what his finall advice was. I thought it was "download all afresh - its fixed now". (Which I thought I had done).> > FastCGI and mod-ruby are installed (under windows) into the wrong > > directory on the wrong drive! > > This is unrelated to rails.Yep.> > > Many errors that Linux manages to produce look like permissions problems > > - but remain even if you chmod the files to 777. > > This indicates that those problems were not related to permissions.Yep.> > > My conclusion is clear. I really do hope my experience is not typical. > > > > Ruby is a tremendous language (I have ised it lightly for 6 months) and > > rails held such promise - I am very disappointed. > > I''m courteously assuming that you''re not a troll and that you actually > want this to work. Your experience is very atypical which, in > software, usually means that you''re doing something differently than > everyone else.I am *very* glad to hear it. I have a small C: drive, so most stuff I install onto the D: drive. It is amazing how much software is broken by just doing this. If you come to the IRC channel with your specific> problems, people will work through it with you until it works. Part of > the "documentation" for rails is the readily availabls support via IRC > and this mailing list. I don''t recall you posting specifically about > your problems here either, though I could easily have missed it.I did venture onto IRC. It was my first visit to IRC and involved searching for some software, downloading it, installing it, and Googling to find out about servers and channels. I did finally get to othe right place, and asked about the /tmp directory. The person I spoke with was unable to help as he was unfamiliar with windows. He was very nice about it - but it was a disapointing result. I have posted (IIRC) 3 requests for help with various problems. I have had some useful info and some ideas that did not help.> > In any case good luck. If you want this to work, come to #rubyonrails > and we''ll help you make it work. It is one of the most friendly and > helpful IRC channels around. >Thanks for the invite. OK. I''ll try one last time. I''ll wipe ruby, rails, gem and apache from my windows machine, and start afresh using WEBrick. Regards Ian _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails