I just downloaded and installed Ruby on Rails to a Win XP SP1 OS using
XAMPP.
I started going through the beginner tutorials at rubyonrails.org. It
appears as though Ruby on Rails is operating properly until I try to
access the MySQL database I created for it. Then the browser displays a
detailed statement created by Ruby. It is titled:
ActiveRecord::StatementInvalid in Recipe#New
Recipe is the table I created in the new database. The error message
displayed next states:
Mysql::Error: Lost Connection to MySQL server during query: SHOW FIELDS
FROM recipes
I checked the MySQL error log I get:
[Warning] mysql.user table is not updated to new password format;
Disabling new password usage until mysql_fix_prifilege_tables is run
I ran the script and recieved a lot of error messages from mysql,
stopped and restarted mysql, still no improvements and the same error
messages are generated.
I also tried a variety of changes to config/database.yml file.
If anyone has any possible solutions or help on this problem it would be
appreciated very much. Thank you
I encountered this error as well, when using WinXP with InstantRails and
WEBrick. I found that when I changed the password for my database user
to blank / empty string, everything started working fine. This is OK on
a test machine, but is obviously not an option for production boxes.
I encountered this error as well, when using WinXP with InstantRails and
WEBrick. I found that when I changed the password for my database user
to blank / empty string, everything started working fine. This is OK on
a test machine, but is obviously not an option for production boxes.
I had the same issue. Also solved by adding in a blank password.
However, isn’t this considered a bug if we need to adapt our DB to “fix”
the rails system? I’m new to the ruby on rails community so please be
gentle.
Ok, so this is the solution I just found for my previous post. I did a
quick followup search and came across this,
I encountered this error as well, when using WinXP with InstantRails and
WEBrick. I found that when I changed the password for my database user
to blank / empty string, everything started working fine. This is OK on
a test machine, but is obviously not an option for production boxes.
I had the same issue. Also solved by adding in a blank password.
However, isn’t this considered a bug if we need to adapt our DB to “fix”
the rails system? I’m new to the ruby on rails community so please be
gentle.
You are probably using an older version of MySQL which has different
password mechanism. You can fix the problem by simply updating to the
latest version of MySQL. I used to have the problem too, but after I
updated MySQL, it all works fine.
You are probably using an older version of MySQL which has different
password mechanism. You can fix the problem by simply updating to the
latest version of MySQL. I used to have the problem too, but after I
updated MySQL, it all works fine.
Thanks for the suggestion. I checked that, and its not it.
I loaded RadRails, and the data-browser worked fine. However, the
WEBrick apps yet again would not even try to connect to the DB server;
not failed password issues or whatever. Those I would see in the MySQL
server log. No connection attempt at all. I am so far rather
disappointed with my Ruby on Rail experience… not being able to even
follow along in the tutorial is rather disheartening.
I wiped my Ruby and Rails environments twice and reinstalled to make
sure I hadn’t done something daft, but that didn’t help. This morning I
wiped Ruby & Rails again, and installed “Instant Rails” to see if I can
get any further down that road. If not, I suppose the next thing to do
is just set up a testing environment on my production Apache box to see
if a deployed application works there at all.
As a I say, rather disheartening.
–
–Michel Vaillancourt
Wolfstar Systems
www.wolfstar.ca
I would either downgrade to 1.1 or wait for 1.2 final. However, since
you cannot connect at all it sounds like a different problem. You
should start going through the RubyonRails.org Wiki. There is a page on
this.
it looks like I have about 15 different things I should try, half of
which involve installing some bundled rails, apache, and mySQL combo.
Am I a dick if I don’t want to start trying all these? I have Apache,
rails, and MySQL on this machine (XP box). They work fine. I want rails
to work now.
get any further down that road. If not, I suppose the next thing to do is
just set up a testing environment on my production Apache box to see if a
deployed application works there at all.
As a I say, rather disheartening.
I know that “lost connection” problem can also be caused by an older,
buggy
version of the mysql ruby adapter. I would recommend trying Instant
Rails
(as you said above). It includes an up to date mysql driver and should
not
have that problem.
installations (imo) are the biggest problem with rails and it’s
supporting cast (mysql drivers. os specific issues, server configs, etc)
after installation is solid, likely your biggest problem will be one
of documentation. Building your personal blogroll and improving your
ability intuit Rail’s philosophy with increase your ability to
deliver quality quickly.
As a final note, you should not consider that to power of rails can
replace solid best practices. (not saying you were, just wanted to
complete the general thought)
Good luck on your journey Matt - you’ll find the community a good
partner.
Jodi
General Partner
The nNovation Group inc.
www.nnovation.ca/blog