Forum: Ruby on Rails Rails Troubles

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.
60cb273500f2bf516a43c4737ec91780?d=identicon&s=25 JD Smith (Guest)
on 2006-01-06 07:12
Greetings:
    I have been attempting to get rails + mysql working for me literally
all day.  I am on a Windows XP SP2 machine using the latest one-click
installer for ruby and gem for rails.
    What am I missing here?  The rails and mysql db do not want to talk
to each other properly.  I tried to do a gem install mysql to get the
latest mysql and that always crashes because it seems to be looking for
linux named .so files instead of the .dll's which are used in windows.
    I have tried this with the 4.1 essential series of mysql and with
the newly releasd 5.0 essential series.  If anyone has any insight as to
what version of everything I need to use and any extra steps I need to
take I would greatly appreciate it.  I am going to uninstall ruby and
mysql tomorrow morning and start from scratch - hopefully with an idea
from you all.

Desperately trying to get things working,

JD Smith
C8a634a01a2c4508360874bff7fb1a7f?d=identicon&s=25 Kevin Olbrich (Guest)
on 2006-01-06 07:15
Give InstantRails a shot, it worked like a charm for me on a windows
box.

http://instantrails.rubyforge.org/
5a992f256f765f8ee3dbb2af9d3db4e0?d=identicon&s=25 Robbie Shepherd (robbie)
on 2006-01-06 07:23
check my post about 4 down from this one "lost mysql connection"

same error, some fixes posted.
D9f7c2101a88ead3714f518e61e8cafe?d=identicon&s=25 Joel Gump (biglaughing)
on 2006-01-06 09:55
(Received via mailing list)
How about the configuration.yml
check it .
maybe you got a wrong configuration between the RoR
and Mysql
60cb273500f2bf516a43c4737ec91780?d=identicon&s=25 JD Smith (Guest)
on 2006-01-06 17:25
joel gump wrote:
> How about the configuration.yml
> check it .
> maybe you got a wrong configuration between the RoR
> and Mysql

It's not a database.yml problem.

- JD
60cb273500f2bf516a43c4737ec91780?d=identicon&s=25 JD Smith (Guest)
on 2006-01-06 17:26
Kevin Olbrich wrote:
> Give InstantRails a shot, it worked like a charm for me on a windows
> box.
>
> http://instantrails.rubyforge.org/

I could use instantrails, but I don't want to have to resort to using it
that way.   I should be able to setup mysql and ruby and rails and be
fine.

- JD
0df56f2edb0d80e81c5c0ef1ca91690e?d=identicon&s=25 Joel Oliveira (Guest)
on 2006-01-06 17:45
(Received via mailing list)
I'll just copy and paste what I wrote for another thread just like
this the other day.  your situation is almost identical to mine.

--

I wrestled with this problem for a good while.

couple things I noticed:

1 - old versus new passwords [in MySQL] might be an issue.  first
thing's first,
add a user with the old password format, and a user with the new
password format.  test with each of those users.  one might work. if
so then you're golden.  stick with that version of the password hash
(old, new, whatever).  This wasn't what fixed my problems though

2 - connecting to a db server that was NOT on my local machine worked ok
for me.
Why? Hell if I know.  I just ran another instance of Mysql on a
seperate computer, allowed my local machine to connect and voila - it
worked.

3 - on a lark I checked that I had mysql.so in :
C:\ruby\lib\ruby\site_ruby\1.8\i386-msvcrt
and oddly enough. I didn't.  The thought occurred to me to check from
some website I ran into ... but of course I can't find right now.  If
a google search doesn't turn up anything that works one of us would
have no issue sending you one.

So, yeah, that fixed it for me.  Why? I have no idea but it works!

---

- Joel
Eea7ad39737b0dbf3de38874e0a6c7d8?d=identicon&s=25 Justin Forder (Guest)
on 2006-01-06 19:45
(Received via mailing list)
JD Smith wrote:
> what version of everything I need to use and any extra steps I need to
> take I would greatly appreciate it.  I am going to uninstall ruby and
> mysql tomorrow morning and start from scratch - hopefully with an idea
> from you all.
>
> Desperately trying to get things working,

Two suggestions:

1. Try without the mysql gem - Rails has its own copy of the pure Ruby
mysql driver, which it will use if no other driver is found.

config\database.yml content like this works for me:

development:
   adapter: mysql
   database: depot_development
   host: localhost
   username: rails
   password:
test:
   adapter: mysql
   database: depot_test
   host: localhost
   username: rails
   password:
production:
   adapter: mysql
   database: depot_development
   host: localhost
   username: rails
   password:

(or use root with the appropriate password, if you have set one.. I had
created a rails user with permissions for the depot tables, and no
password)

2. If you do decide to start from scratch again, try using Instant
Rails, which bundles everything needed (Ruby, Rails, Apache, and MySQL)

   http://instantrails.rubyforge.org/wiki/wiki.pl

N.B. Don't run another instance of MySQL at the same time as Instant
Rails - if you do, you will have to run the Instant Rails instance of
MySQL on a different socket, rather than the usual 3306, and then you
will have to configure that everywhere...

Good luck!

   Justin
60cb273500f2bf516a43c4737ec91780?d=identicon&s=25 JD Smith (Guest)
on 2006-01-06 20:01
Aye, I saw that not long ago Joel and it led me to searching for a
windows version of mysql.so  I found it, installed an older 4.1
essential release and now i'm working.  Thanks! :)

Cordially,

JD Smith

Joel Oliveira wrote:
> I'll just copy and paste what I wrote for another thread just like
> this the other day.  your situation is almost identical to mine.
>
> --
>
> I wrestled with this problem for a good while.
>
> couple things I noticed:
>
> 1 - old versus new passwords [in MySQL] might be an issue.  first
> thing's first,
> add a user with the old password format, and a user with the new
> password format.  test with each of those users.  one might work. if
> so then you're golden.  stick with that version of the password hash
> (old, new, whatever).  This wasn't what fixed my problems though
>
> 2 - connecting to a db server that was NOT on my local machine worked ok
> for me.
> Why? Hell if I know.  I just ran another instance of Mysql on a
> seperate computer, allowed my local machine to connect and voila - it
> worked.
>
> 3 - on a lark I checked that I had mysql.so in :
> C:\ruby\lib\ruby\site_ruby\1.8\i386-msvcrt
> and oddly enough. I didn't.  The thought occurred to me to check from
> some website I ran into ... but of course I can't find right now.  If
> a google search doesn't turn up anything that works one of us would
> have no issue sending you one.
>
> So, yeah, that fixed it for me.  Why? I have no idea but it works!
>
> ---
>
> - Joel
This topic is locked and can not be replied to.