I start the MySQL server with the “ruby script/server” command.
It loads fine.
When I go to localhost:3000, the server immediately shuts down and
throws out an error. It says:
C:\ruby\lib\ruby\gems\1.8\gems\activerecord-2.3.2\lib\active_record\connection_adapters\abstract_adapter.rb:39:
[BUG] Segmentation fault ruby 1.8.6 (2008-08-11) [i386-mswin32].
I’ve been looking around online and many have the same error occuring.
I’m running mysql 5.0.83, rails 2.3.2, ruby 1.8.6 and rubygems 1.3.4.
On Thu, Jul 9, 2009 at 8:10 AM, Jason Cheung[email protected] wrote:
I start the MySQL server with the “ruby script/server” command.
It loads fine.
When I go to localhost:3000, the server immediately shuts down and
throws out an error. It says:
C:\ruby\lib\ruby\gems\1.8\gems\activerecord-2.3.2\lib\active_record\connection_adapters\abstract_adapter.rb:39:
[BUG] Segmentation fault ruby 1.8.6 (2008-08-11) [i386-mswin32].
I’ve been looking around online and many have the same error occuring.
I’m running mysql 5.0.83, rails 2.3.2, ruby 1.8.6 and rubygems 1.3.4.
Can you run ruby -v so we can see the patchlevel?
Certain patchlevels of 1.8.6 have serious issues. Newer ones seem to
work fine.
I start the MySQL server with the “ruby script/server” command.
It loads fine.
Actaully, that’s how you are starting you Rails server, most likely.
Usually a MySQL server is started with a command like mysqld_safe.
When I go to localhost:3000, the server immediately shuts down and
throws out an error. It says:
C:\ruby\lib\ruby\gems\1.8\gems\activerecord-2.3.2\lib\active_record
\connection_adapters\abstract_adapter.rb:39:
[BUG] Segmentation fault ruby 1.8.6 (2008-08-11) [i386-mswin32].
I’ve been looking around online and many have the same error occuring.
I’m running mysql 5.0.83, rails 2.3.2, ruby 1.8.6 and rubygems 1.3.4.
Can anybody help!?
There’s some nasty bug in whatever code Rails needs to load to display
the homepage of your site. It really shouldn’t be segfaulting, but
that’s the issue.
The error looks like it is probably related to connecting to your
database, just because of where it comes from in the code. Here are
some reality check type questions:
Do you have a database installed?
Is that database running?
Is your config/database.yml file correctly pointed at that database?
Beyond that, you may find better help on the Rails mailing list:
For some reason, however, it appears that Rails is unable to find a
required MySQL dll. The best fix I’ve been able to find (ok, I admit
this is clunky, but anyhow it works) is to copy libmySQL.dll from your
MySQL binary directory (for example, C:\Program Files\MySQL\MySQL
Server 5.0\bin) into the Ruby binary directory (for example, C:\ruby
\bin). Restart your application (shut down and restart the server),
then try running it again. For me, that fixes the problem.
On Thu, Jul 9, 2009 at 10:31 AM, Jason Cheung[email protected] wrote:
Can you run ruby -v so we can see the patchlevel?
-greg
patchlevel is 287
Hmm… probably not Ruby then. p287 works-for-me.
The next place I’d look would be the mysql adapter. Unfortunately,
it’ll take someone else who’s using MySQL on Windows to help you w.
that.
In the winows\system32 directory you may find a file called regserver32
or something like that. Drag the dll onto that and drop and see if that
fixes it.
From: Kai König [email protected]
To: ruby-talk ML [email protected]
Sent: Thursday, July 9, 2009 10:15:07 AM
Subject: Re: Why is my server shutting down?
For some reason, however, it appears that Rails is unable to find a
required MySQL dll. The best fix I’ve been able to find (ok, I admit
this is clunky, but anyhow it works) is to copy libmySQL.dll from your
MySQL binary directory (for example, C:\Program Files\MySQL\MySQL Server
5.0\bin) into the Ruby binary directory (for example, C:\ruby\bin).
Restart your application (shut down and restart the server), then try
running it again. For me, that fixes the problem.