Forum: Ruby on Rails Win XP/ Mysql Problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
bryan smith (Guest)
on 2006-02-20 16:06
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.
Michael T. (Guest)
on 2006-02-20 16:35
(Received via mailing list)
It looks like you do not have a products table anymore.  I'm sure you
do, but would you verify that.

Michael
Richard Hart (Guest)
on 2006-02-20 16:35
(Received via mailing list)
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
David H. (Guest)
on 2006-02-20 16:47
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: 3306

Sorry 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
bryan smith (Guest)
on 2006-02-20 17:00
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.
Justin M. (Guest)
on 2006-02-20 17:02
On XP if your using instant rails my setups all seem to have no password
and work fine?

password:
bryan smith (Guest)
on 2006-02-20 17:17
I would guess your mysql root password hasn't been set then.

Anyone else have any ideas on this?
Michael T. (Guest)
on 2006-02-20 18:07
(Received via mailing list)
What happens if you leave off the host, port, and socked?

Michael
bryan smith (Guest)
on 2006-02-20 18:14
Michael T. wrote:
> What happens if you leave off the host, port, and socked?
>
> Michael

Just tried, same error.
Erik van Oosten (Guest)
on 2006-02-20 18:47
(Received via mailing list)
Perhaps its the 'root@localhost' != 'root@%' security feature.

     Erik.

bryan smith schreef:
Michael T. (Guest)
on 2006-02-20 19:08
(Received via mailing list)
What's your environment look like?  Are you using InstantRails?  If
not you might try that and see if the problem goes away.
bryan smith (Guest)
on 2006-02-20 22:25
Michael T. 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.
Tony C. (Guest)
on 2006-02-21 00:26
(Received via mailing list)
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
bryan smith (Guest)
on 2006-02-21 15:35
Tony C. 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?
Mats L. (Guest)
on 2006-02-21 15:52
(Received via mailing list)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

bryan smith wrote:
> 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 L.                   |
| 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-----
bryan smith (Guest)
on 2006-02-21 16:08
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!
Mats L. (Guest)
on 2006-02-21 16:25
(Received via mailing list)
-----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 L.                   |
| 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-----
Michael T. (Guest)
on 2006-02-21 16:41
(Received via mailing list)
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 H. have all the headaches while you get some
real work done.  Just a recommendation.

Michael
This topic is locked and can not be replied to.