Hi once again,
I just made some changes to the code and it seems to work just fine
right now... but I don't know how to explain :)
the thing is I'm using sinatrarb as a web microframework and under my
config.ru I had
configure :production do
enable :logging, :dump_errors
disable :run
set :raise_errors, true
set :logging, true
DataMapper.setup(:default, {:adapter => 'mysql', :host =>
'XX.XX.XX.XY', :username => 'nagiosadmin', :password =>
'lol', :database => 'nagios'})
DataMapper::Logger.new(STDOUT, :debug)
end
and now I have
DataMapper.setup(:default, {:adapter => 'mysql', :host =>
'XX.XX.XX.XY', :username => 'nagiosadmin', :password =>
'lol', :database => 'nagios'})
configure :production do
enable :logging, :dump_errors
disable :run
set :raise_errors, true
set :logging, true
DataMapper::Logger.new(STDOUT, :debug)
end
I just moved DataMapper setting out of the configure block.
I think I 'm gona ask to sinatrarb ml what are the implications about
this change.
Regards
Francisco
On Feb 4, 10:49 am, Francisco Cabrita <[email protected]>
wrote:
> Hi Casual,
>
> On Feb 4, 1:32 am, casual <[email protected]> wrote:
>
> > Can you post the full stack trace? That error happens when something
> > in your app is referring to a busted reference, like a C extension
> > with a bug in it. I don't believe anything in dm-core, dm-more, or
> > extlib reference any C extensions though.
>
> I started thin with --trace. I have made a few requests and thats all.
> Is that what you mean?
>
> http://pastebin.com/m11bc0eb9
>
> The weird thing is thta I can make some requests without any problem,
> but with no reason the app crashes
> (see at the bottom of the logs)
>
> I can make a strace on it. Its that what you refer?
>
> Once again many thanks
> Francisco
>
>
>
> > On Feb 3, 11:29 am, Francisco Cabrita <[email protected]>
> > wrote:
>
> > > Hi,
>
> > > I just made a simple Sinatra application to fetch some information in
> > > a very simple way.
>
> > > like:
> > > ...
> > > @hosts = NagiosHosts.all
> > > ...
>
> > > Where the class is just this:
>
> > > class NagiosHosts
> > > include DataMapper::Resource
> > > storage_names[:default] = 'nagios_hosts'
> > > property :id, Serial, :field => 'host_id'
> > > property :display_name, String, :field => 'display_name'
> > > property :host_id, Serial, :field => 'host_object_id'
> > > end
>
> > > When running the application, I get no errors or warnings and I can
> > > use this query sometimes but then kaputz something wrong appens and I
> > > get an Abort like this:
>
> > > /usr/local/rvm/gems/ree-1.8.7-2010.01/gems/dm-core-0.10.2/lib/dm-core/
> > > resource.rb:660: [BUG] rb_gc_mark(): unknown data type 0x30
> > > (0x14e0cb70) non object
> > > ruby 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux], MBARI 0x6770,
> > > Ruby Enterprise Edition 2010.01
>
> > > I don't know if this is a RVM / ree 1.8.7 problem or dm-core problem.
> > > Can some nice soul help me debug this :)
>
> > > Thanks in advance,
> > > Francisco
--
You received this message because you are subscribed to the Google Groups
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/datamapper?hl=en.