Hi all, Got a Win2k3 Server box (but this has been verified not to work also on WinXP Pro SP2) with: Ruby 1.8.2 Rails 1.1.4 PostgreSQL 8.1 The generate\scaffold script fails to generate the files inside the app/model/views directories. It actually generates the view directory but fails to produce any files. The same thing works perfectly when I''m targetting MySQL. So is this normal behaviour with postgres-pr (the standard driver that ships with Rails) or can i fix it someway? Thanks, Lorenzo -- Posted via http://www.ruby-forum.com/.
> The generate\scaffold script fails to generate the files inside the > app/model/views directories. It actually generates the view directory > but fails to produce any files. > > The same thing works perfectly when I''m targetting MySQL.I had the same symptoms when rails could not connect to the database. Check the config/database.yml and make sure that you can connect using that login (check for development vs. testing vs. production as well) I wanted to change the port that MySQL uses, so without documentation, I just added :port => 1234, and it worked! Low-surprise rocks. Cheers -- Posted via http://www.ruby-forum.com/.
Richard Haven wrote:>> The generate\scaffold script fails to generate the files inside the >> app/model/views directories. It actually generates the view directory >> but fails to produce any files. >> >> The same thing works perfectly when I''m targetting MySQL. > > I had the same symptoms when rails could not connect to the database. > Check the config/database.yml and make sure that you can connect using > that login (check for development vs. testing vs. production as well) > > I wanted to change the port that MySQL uses, so without documentation, I > just added :port => 1234, and it worked! Low-surprise rocks. > > CheersIf your database does exist, make sure that the tables exist in there as well. I''ve been bitten by that bug many a late night when I began ramping up on rails. -- Posted via http://www.ruby-forum.com/.
If your using postgres, try using the command: rails myapp --database=postgres This will generate a database.yml that is specific for your database. Good luck! Bing -- Posted via http://www.ruby-forum.com/.
So new to Rails so I apologize if I''m way off... Is ''scaffold'' supposed to create something in /views? I''m trying to work thru the tutorial and I can''t seem to get it to work. My error msg is "Errno::ENOENT in RecipeController#new". Is this the same problem? -- Posted via http://www.ruby-forum.com/.
Richard Haven wrote:>> The generate\scaffold script fails to generate the files inside the >> app/model/views directories. It actually generates the view directory >> but fails to produce any files. >> >> The same thing works perfectly when I''m targetting MySQL. > > I had the same symptoms when rails could not connect to the database. > Check the config/database.yml and make sure that you can connect using > that login (check for development vs. testing vs. production as well) > > I wanted to change the port that MySQL uses, so without documentation, I > just added :port => 1234, and it worked! Low-surprise rocks. > > CheersHi Richard, my PG is running on the standard port and i can connect to it just fine with my user/password. The name of the database i''m targetting is ok. I''ve once been bitten by a kinda same bug because i was wanting to scaffold a "users" table which is a reserved keyword for PG... but this is not the case as I''m verifying it also with a "foos" table. Thanks for helping anyway... gotta investigate this further! Lorenzo -- Posted via http://www.ruby-forum.com/.