Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Segmentation fault on Windows
Jyo Ni
8/11/2008 10:19:00 AM
Hi,
When I try to run the following program I get a segmentation fault:
require 'rubygems'
require 'json'
require 'net/http'
def testrsv()
base_url =
"
http://10.221.112.10:8080/reserve-online/reservations?status=emailed&format=...
url = "#{base_url}"
resp = Net::HTTP.get_response(URI.parse(base_url))
data = resp.body
# data structure - a hash
result = JSON.parse(data)
# if the hash has 'Error' as a key, we raise an error
result['reservations']['reservation'].each { |result|
print "#{result['ean']} => #{result['status']}\n"
}
end
C:/Users/SudJyo/AppData/Local/Temp/rb276D.tmp:21: [BUG] Segmentation
fault
ruby 1.8.6 (2007-09-24) [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.
Can anyone help me finding the cause of this issue?
Thanks,
Jyo
--
Posted via
http://www.ruby-...
.
1 Answer
Roger Pack
8/11/2008 5:20:00 PM
0
which ruby version and compiler are you using for json?
Jyo Ni wrote:
> Hi,
>
> When I try to run the following program I get a segmentation fault:
> require 'rubygems'
> require 'json'
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Segmentation fault on Windows
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password