You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ruby-opengeodb
Ich habe die OpenGeoDB und das ruby-opengeodb gem installiert. Danach
wollte ich das folgende Beispiel von der Homepage ausprobieren:
require 'rubygems'
require 'ruby-opengeodb'
class SandboxController < ApplicationController
def index
Location.db_connect
plzs = %w(13359 67059 90459 56068 69115)
@locations = []
plzs.each do |plz|
loc = Location.new(plz)
# @locations << loc
# puts "PLZ: #{plz} Ort: #{loc.ort} Lat: #{loc.lat} Lon:
#{loc.lon}"
end
end
end
Leider bekomme ich beim Aufruf von "Locations.new(plz)" folgende
Fehlermeldung:
You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]
Der Fehler scheint im Gem aufzutreten oder mache ich was falsch? Woher
kommt die Fehlermeldung? Die OpenGeoDB scheint korrekt eingerichtet
und wird ja auch problemlos geöffnet.