Why is my server shutting down?

J

Jason Cheung

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 anybody help!?
Thanks,
Jay
 
G

Gregory Brown

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.

-greg
 
G

Gregory Brown

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.

-greg
 
J

James Gray

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:

http://groups.google.com/group/rubyonrails-talk

James Edward Gray II
 
K

Kai König

For some reason, however, it appears that Rails is unable to find a =20
required MySQL dll. The best fix I=92ve been able to find (ok, I admit =20=

this is clunky, but anyhow it works) is to copy libmySQL.dll from your =20=

MySQL binary directory (for example, C:\Program Files\MySQL\MySQL =20
Server 5.0\bin) into the Ruby binary directory (for example, C:\ruby=20
\bin). Restart your application (shut down and restart the server), =20
then try running it again. For me, that fixes the problem.

cheers
 
G

Garry Freemyer

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.=0A=0A=0A=0A=0A________________________________=0AFrom: Kai K=C3=B6nig <=
(e-mail address removed)>=0ATo: ruby-talk ML <[email protected]>=0ASe=
nt: Thursday, July 9, 2009 10:15:07 AM=0ASubject: Re: Why is my server shut=
ting down?=0A=0AFor some reason, however, it appears that Rails is unable t=
o find a required MySQL dll. The best fix I=E2=80=99ve been able to find (o=
k, I admit this is clunky, but anyhow it works) is to copy libmySQL.dll fro=
m your MySQL binary directory (for example, C:\Program Files\MySQL\MySQL Se=
rver 5.0\bin) into the Ruby binary directory (for example, C:\ruby\bin). Re=
start your application (shut down and restart the server), then try running=
it again. For me, that fixes the problem.=0A=0Acheers=0AOn 09.07.2009, at =
14:10, Jason Cheung wrote:=0A=0A> I start the MySQL server with the "ruby s=
cript/server" command.=0A> It loads fine.=0A> When I go to localhost:3000, =
the server immediately shuts down and=0A> throws out an error. It says:=0A>=
C:\ruby\lib\ruby\gems\1.8\gems\activerecord-2.3.2\lib\active_record\connec=
tion_adapters\abstract_adapter.rb:39:=0A> [BUG] Segmentation fault ruby 1.8=
6 (2008-08-11) [i386-mswin32].=0A> I've been looking around online and man=
y have the same error occuring.=0A> I'm running mysql 5.0.83, rails 2.3.2, =
ruby 1.8.6 and rubygems 1.3.4.=0A> =0A> Can anybody help!?=0A> Thanks,=0A> =
Jay=0A> --Posted via http://www.ruby-forum.com/.=0A>
 
J

Jason Cheung

It's working now. I wish I could shed a bit of light on how it was fixed
but it literally just started working by itself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,229
Latest member
GloryAngul

Latest Threads

Top