RoR example and segmentation fault!

J

JZ

I tried add new ticket "Elite Journal" example I found in docs section of
RoR but I get "Precondition Failed. The precondition on the request for the
URL /newticket evaluated to false." So I send the problem here:

PROBLEM: After login I cannot click on anything because I get segmentation
fault :( I am using windows xp pro sp2. The problem looks serious and I am
afraid of stability RoR on win32 system...

---------------------------------
C:\opt\cygwin\home\rails\elitejournal>ruby script\server -i journal
=> Rails application started on http://127.0.0.1:3000
[2005-07-15 01:10:11] INFO WEBrick 1.3.1
[2005-07-15 01:10:11] INFO ruby 1.8.2 (2004-12-25) [i386-mswin32]
[2005-07-15 01:10:11] INFO WEBrick::HTTPServer#start: pid=5556 port=3000
127.0.0.1 - - [15/Jul/2005:01:11:33 îrodkowoeuropejski czas stand.] "GET /
HTTP/
1.1" 200 1771
http://localhost:3000/ -> /
127.0.0.1 - - [15/Jul/2005:01:11:33 îrodkowoeuropejski czas stand.] "GET
/styles
heets/ej-layout.css HTTP/1.1" 404 614
http://localhost:3000/ -> /stylesheets/ej-layout.css
127.0.0.1 - - [15/Jul/2005:01:11:35 îrodkowoeuropejski czas stand.] "GET /
HTTP/
1.1" 200 1771
http://localhost:3000/ -> /
127.0.0.1 - - [15/Jul/2005:01:11:36 îrodkowoeuropejski czas stand.] "GET
/styles
heets/ej-layout.css HTTP/1.1" 404 614
http://localhost:3000/ -> /stylesheets/ej-layout.css
c:/opt/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_e
xt/string/../../inflector.rb:41: [BUG] Segmentation fault
ruby 1.8.2 (2004-12-25) [i386-mswin32]

This application has requested the Runtime to terminate it in an unusual
way.Please contact the application's support team for more information.
 
D

daz

JZ said:
I tried add new ticket "Elite Journal" example I found in docs section of
RoR but I get "Precondition Failed. The precondition on the request for the
URL /newticket evaluated to false." So I send the problem here:

PROBLEM: After login I cannot click on anything because I get segmentation
fault :( I am using windows xp pro sp2. The problem looks serious and I am
afraid of stability RoR on win32 system...

---------------------------------
C:\opt\cygwin\home\rails\elitejournal>ruby script\server -i journal
=> Rails application started on http://127.0.0.1:3000
[2005-07-15 01:10:11] INFO WEBrick 1.3.1
[2005-07-15 01:10:11] INFO ruby 1.8.2 (2004-12-25) [i386-mswin32]

Are you just starting with RoR or have you been using it for some time ?

Have you got a cygwin build or any other build Ruby of Ruby apart from
[i386-mswin32] mentioned in the info ?

Are you the type of person who borrows files with the same names from other
directories ;-)

Can you see where I'm going with this ?

Any extra info might help the folks here.


daz
 
J

JZ

Dnia Fri, 15 Jul 2005 01:29:00 +0100, daz napisa³(a):
Are you just starting with RoR or have you been using it for some time ?

I am still feeling a newbe to RoR. Why are you asking?
Have you got a cygwin build or any other build Ruby of Ruby apart from
[i386-mswin32] mentioned in the info ?

I have both: cygwin & ruby one click installer. This example was executed
from console of winxp (not cygwin because under cygwin it couldn't even to
start).
Are you the type of person who borrows files with the same names from other
directories ;-)

??
 
D

Daniel Berger

JZ said:
I tried add new ticket "Elite Journal" example I found in docs section of
RoR but I get "Precondition Failed. The precondition on the request for the
URL /newticket evaluated to false." So I send the problem here:

PROBLEM: After login I cannot click on anything because I get segmentation
fault :( I am using windows xp pro sp2. The problem looks serious and I am
afraid of stability RoR on win32 system...

c:/opt/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_e
xt/string/../../inflector.rb:41: [BUG] Segmentation fault
ruby 1.8.2 (2004-12-25) [i386-mswin32]

This application has requested the Runtime to terminate it in an unusual
way.Please contact the application's support team for more information.
---------------------------------

Curious. Line 41 of inflector.rb is simply this:

class_name_in_module.to_s.gsub(/^.*::/, '')

This converts strings like "Foo::Bar" to "Bar". I've done some testing
with .to_s.gsub in order to try to cause a segfault on my WinXP Pro
box, but I can't do it. I've tried millions of iterations using empty
strings, nil, numbers - still works fine.

To narrow it down, add the following code above line 41:

File.open("C:\\temp.log","w+"){ |fh|
fh.puts("class name was: #{class_name_to_module}")
}

Next time it segfaults, take a look at temp.log and see what it says.
If that isn't helpful, try replacing line 41 with this line:

class_name_in_module.to_s.split("::").last

It does the same thing, though it's a bit slower. If it works, then we
know it's somehow related to gsub. If it doesn't work, then the real
issue lies elsewhere.

Regards,

Dan
 
D

daz

JZ said:
Dnia Fri, 15 Jul 2005 01:29:00 +0100, daz napisa³(a):


I am still feeling a newbe to RoR. Why are you asking?

Just that if you get an error with the first thing you try,
it's more likely to be an installation problem.

If you'd been using it successfully for a few days, then got an
an error, that's more likely to be a software problem.

Have you got a cygwin build or any other build Ruby of Ruby apart from
[i386-mswin32] mentioned in the info ?

I have both: cygwin & ruby one click installer. This example was executed
from console of winxp (not cygwin because under cygwin it couldn't even to
start).

OK. That's the kind of additional information that could
provide a pointer to where the problem lies.


Well, I guessed at an installation problem.
Cygwin and MSVC(mswin) binaries are not compatible with each other.

So, for example, if you had an earlier error message saying
something like "could not find xyz.so", you might have done
a search on your HD, found it in the cygwin directory and then
copied it over instead of installing the mswin version.

Something _like_ that would surely lead to trouble.

A re-install into a directory outside of your cygwin folder
would be, IMHO, worth trying.

Also, I believe cygwin alters your PATH environment variable ?

Please post back if you get any further.


daz
 

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,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top