I''ve searched everywher for an answer to my problem, and the only thing I''ve found is people with the same problem. I''m hoping someone has an answer here: I''m working through the agile web developement with rails book and when I goto scaffold the products table I get the following message. exists app/controllers/ exists app/helpers/ exists app/views/admin exists test/functional/ dependency model exists app/models/ exists test/unit/ exists test/fixtures/ identical app/models/product.rb identical test/unit/product_test.rb identical test/fixtures/products.yml error Before updating scaffolding from new DB schema, try creating a tab le for your model (Product) For the life of me I cannot figure out the problem. I''ve reinstalled a million times. My config file is as followed. development: adapter: mysql database: depot_dev username: root password: admin host: localhost test: adapter: mysql database: depot_test username: root password:admin host: localhost production: adapter: mysql database: depot_production username: root password: admin host: localhost Thanks for any help. I''m excited to actually get rails working. -- Posted via http://www.ruby-forum.com/.
It looks like you do not have a products table anymore. I''m sure you do, but would you verify that. Michael
If its any help I inculuded the port definition in my database file: development: adapter: mysql database: cwpdb username: root password: ******* host: localhost port: 3306> For the life of me I cannot figure out the problem. I''ve > reinstalled a million times.
Richard Hart wrote:> If its any help I inculuded the port definition in my database file: > > development: > adapter: mysql > database: cwpdb > username: root > password: ******* > host: localhost > port: 3306Sorry to bust into this dialogue, but I have run into a similar problem on my Mac. When I try to execute: ruby script/generate scaffold item my Terminal (like DOS in Windows) window justs hangs. Generate Controller and Generate Model work fine. Then when I put scaffold :item in the controller and go to open /item/new or item/list I get a NoMethodError. It appears to be a breakdown in communication to the db. I am using the same database.yml config as Richard above. I am also using MySQL. Ideas? Thanks, David -- Posted via http://www.ruby-forum.com/.
There is a products table in each of the databases. I''ve tried different combos of having the host name/and port number. Nothing seems to work. -- Posted via http://www.ruby-forum.com/.
On XP if your using instant rails my setups all seem to have no password and work fine? password: -- Posted via http://www.ruby-forum.com/.
I would guess your mysql root password hasn''t been set then. Anyone else have any ideas on this? -- Posted via http://www.ruby-forum.com/.
What happens if you leave off the host, port, and socked? Michael
Michael Trier wrote:> What happens if you leave off the host, port, and socked? > > MichaelJust tried, same error. -- Posted via http://www.ruby-forum.com/.
Perhaps its the ''root@localhost'' != ''root@%'' security feature. Erik. bryan smith schreef:> I would guess your mysql root password hasn''t been set then. > > Anyone else have any ideas on this? > >
What''s your environment look like? Are you using InstantRails? If not you might try that and see if the problem goes away.
Michael Trier wrote:> What''s your environment look like? Are you using InstantRails? If > not you might try that and see if the problem goes away.Win xp Mysql 4.1 IIS Not a fan of all in one packages. Is it very good for developement. I thought it looked good for production only. -- Posted via http://www.ruby-forum.com/.
What happens when you try to telnet localhost 3306? Are you able to connect using the mysql commandline client? XP is probably configured to block the port with the Windows firewall. Tony On 2/20/06, bryan smith <bsmith@inghamisd.org> wrote:> > Michael Trier wrote: > > What''s your environment look like? Are you using InstantRails? If > > not you might try that and see if the problem goes away. > > Win xp > Mysql 4.1 > IIS > > Not a fan of all in one packages. Is it very good for developement. I > thought it looked good for production only. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060220/a5fb5815/attachment.html
Tony Collen wrote:> What happens when you try to telnet localhost 3306? Are you able to > connect > using the mysql commandline client? > > XP is probably configured to block the port with the Windows firewall. > > TonyIt''s free and clear. Windows firewall is turned off. And I can use other programs to externall connect to it through 3306. Any other ideas? -- Posted via http://www.ruby-forum.com/.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 bryan smith wrote:> Tony Collen wrote: >> What happens when you try to telnet localhost 3306? Are you able to >> connect >> using the mysql commandline client? >> >> XP is probably configured to block the port with the Windows firewall. >> >> Tony > > It''s free and clear. Windows firewall is turned off. And I can use other > programs to externall connect to it through 3306. > > Any other ideas? >I had some issues with mysql4 so I use mysql5 which works like a charm. Connection issues. Try switching. - -- ======================================| MVH Mats Lindblad | | Systemutvecklare / Webbutvecklare | | +46-8-6747466 | | Enheten f?r IT och media | | <http://www.it.su.se/> | | <http://www.su.se/> | | Stockholms universitet | | S-106 91 STOCKHOLM | ======================================-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFD+xomoKZhClUZTE8RAhdiAJ4kNINXT5bbROF0i7VWt6MFUPWygQCeK1fe s5ppt370pgDvGFXzTolhU9Y=mbgE -----END PGP SIGNATURE----- -------------- next part -------------- A non-text attachment was scrubbed... Name: mats.lindblad.vcf Type: text/x-vcard Size: 403 bytes Desc: not available Url : http://wrath.rubyonrails.org/pipermail/rails/attachments/20060221/c0825fb1/mats.lindblad.vcf
ding ding ding ding ding, bob we have a winner. I connected to our test mysql box here at work (running mysql 5) and it worked or at least no error messages. Thanks! -- Posted via http://www.ruby-forum.com/.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 bryan smith wrote:> ding ding ding ding ding, bob we have a winner. > > I connected to our test mysql box here at work (running mysql 5) and it > worked or at least no error messages. > > Thanks! >so the question is "what the heck is up with mysql4 on rails?"! :) Congrats, dude. ;) - -- ======================================| MVH Mats Lindblad | | Systemutvecklare / Webbutvecklare | | +46-8-6747466 | | Enheten f?r IT och media | | <http://www.it.su.se/> | | <http://www.su.se/> | | Stockholms universitet | | S-106 91 STOCKHOLM | ======================================-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFD+yK+oKZhClUZTE8RApLkAJ4jWl7aNc39NXXIG3yfgN94jA+tNQCeJR5s k9JglzHlPa6ypX9NPAYro/w=URsa -----END PGP SIGNATURE----- -------------- next part -------------- A non-text attachment was scrubbed... Name: mats.lindblad.vcf Type: text/x-vcard Size: 403 bytes Desc: not available Url : http://wrath.rubyonrails.org/pipermail/rails/attachments/20060221/46f3500a/mats.lindblad.vcf
Glad you got it working. There were some issues with MySQL4 and the password change, but your error doesn''t point to that problem. FWIW, I know you''re reluctant to use an all in one solution, but you have to ask yourself do you want to spend a lot of time mucking with software configurations or do you want to spend that time having fun with Rails. InstantRails is a great solution, because it''s zero installation, doesn''t mess up your machine, and if you don''t like you just delete the directory. Of course I wouldn''t use anything like this in a production environment, I''m just speaking for development purposes. Let Curt Hibbs have all the headaches while you get some real work done. Just a recommendation. Michael
I''ve seen that problem when either (a) I didn''t have the table defined before running the generate scripts, or (b) I had something wrong in my database.yml file that prevented rails from connecting to my database. I''m running MySQL 4.x under WindowsXP with the following in my database.yml: development: adapter: mysql database: myproject_development username: **** password: **** socket: /tmp/mysql.sock Maybe that format of socket will work for you? -Steve -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of bryan smith Sent: Monday, February 20, 2006 6:06 AM To: rails@lists.rubyonrails.org Subject: [Rails] Win XP/ Mysql Problem I''ve searched everywher for an answer to my problem, and the only thing I''ve found is people with the same problem. I''m hoping someone has an answer here: I''m working through the agile web developement with rails book and when I goto scaffold the products table I get the following message. exists app/controllers/ exists app/helpers/ exists app/views/admin exists test/functional/ dependency model exists app/models/ exists test/unit/ exists test/fixtures/ identical app/models/product.rb identical test/unit/product_test.rb identical test/fixtures/products.yml error Before updating scaffolding from new DB schema, try creating a tab le for your model (Product) For the life of me I cannot figure out the problem. I''ve reinstalled a million times. My config file is as followed. development: adapter: mysql database: depot_dev username: root password: admin host: localhost test: adapter: mysql database: depot_test username: root password:admin host: localhost production: adapter: mysql database: depot_production username: root password: admin host: localhost Thanks for any help. I''m excited to actually get rails working. -- Posted via http://www.ruby-forum.com/. _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails