Why is my server shutting down?

View: New views
8 Messages — Rating Filter:   Alert me  

Why is my server shutting down?

by Jason Cheung :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
--
Posted via http://www.ruby-forum.com/.


Re: Why is my server shutting down?

by Gregory Brown :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 9, 2009 at 8:10 AM, Jason Cheung<jaych1000@...> 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.

-greg


Re: Why is my server shutting down?

by Jason Cheung :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> Can you run ruby -v so we can see the patchlevel?
>
> -greg

patchlevel is 287

--
Posted via http://www.ruby-forum.com/.


Re: Why is my server shutting down?

by Gregory Brown :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 9, 2009 at 10:31 AM, Jason Cheung<jaych1000@...> 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.

-greg


Re: Why is my server shutting down?

by James Gray-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Jul 9, 2009, at 7:10 AM, Jason Cheung wrote:

> 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



Re: Why is my server shutting down?

by Kai König :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

cheers
On 09.07.2009, at 14:10, Jason Cheung 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 anybody help!?
> Thanks,
> Jay
> --
> Posted via http://www.ruby-forum.com/.
>


Re: Why is my server shutting down?

by Garry Freemyer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <kai@...>
To: ruby-talk ML <ruby-talk@...>
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.

cheers
On 09.07.2009, at 14:10, Jason Cheung 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 anybody help!?
> Thanks,
> Jay
> --Posted via http://www.ruby-forum.com/.
>

Re: Why is my server shutting down?

by Jason Cheung :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.
--
Posted via http://www.ruby-forum.com/.