Hi, I''m having fun playing around with Camping...I am slowly working on extending tepee to a personal e-notebook sort of tool (never lose my papers/revisions....hehe). I''ve given tepee an oswd css design, and am currently adding a admin page that I want to show the ruby version, sqlite version and db size and db stats information. I tried running: @db_stats = ZenDesk::Models::Base.find_by_sql("SELECT * FROM sqlite_master") to see what information I could gleen from the master table and I got this error: ZenDesk::Controllers::Admin.GET ActiveRecord::SubclassNotFound The single-table inheritance mechanism failed to locate the subclass: ''table''. This error is raised because the column ''type'' is reserved for storing the class in case of inheritance. Please rename this column if you didn''t intend it to be used for storing the inheritance class or overwrite ActiveRecord::Base.inheritance_column to use another column for that information.: C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:897:in `instantiate_without_callbacks'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/callbacks.rb:215:in `instantiate'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:431:in `find_by_sql'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:431:in `find_by_sql'' zendesk.rb:85:in `get'' (eval):21:in `service'' (eval):44:in `run'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel/camping.rb:36:in `process'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel.rb:389:in `process_client'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel.rb:359:in `initialize'' C:/Program Files (x86)/ruby/lib/ruby/1.8/timeout.rb:56:in `timeout'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel.rb:358:in `initialize'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel.rb:356:in `initialize'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel.rb:355:in `initialize'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel/camping.rb:57:in `start'' zendesk.rb:218 After some spee-lunking around I know the sqlite master table has columns ''table'' and ''type''....from the error message I understand that ActiveRecord assumes these columns are used internally to allow STI or subclassing of Models.... I can''t see how to get my query to work. Hehe...I''m not 100% sure the information I want in the table is there even (db size, next index, ect.). Any thoughts or input is appreciated. I''m having fun nonetheless! david g. --------------------------------- Blab-away for as little as 1?/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060325/02d4f96d/attachment.htm
this does what I wanted: res = ZenDesk::Models::Base.connection.execute("SELECT * FROM sqlite_master") @db_stats = res.inspect render :admin_show anyone know how to get the sqlite version (if possible) from an sql statement. Eg. in mySQL "SELECT VERSION()"....can''t find a sqlite function to do it.... David G. DG <blue_technx at yahoo.com> wrote: Hi, I''m having fun playing around with Camping...I am slowly working on extending tepee to a personal e-notebook sort of tool (never lose my papers/revisions....hehe). I''ve given tepee an oswd css design, and am currently adding a admin page that I want to show the ruby version, sqlite version and db size and db stats information. I tried running: @db_stats = ZenDesk::Models::Base.find_by_sql("SELECT * FROM sqlite_master") to see what information I could gleen from the master table and I got this error: ZenDesk::Controllers::Admin.GET ActiveRecord::SubclassNotFound The single-table inheritance mechanism failed to locate the subclass: ''table''. This error is raised because the column ''type'' is reserved for storing the class in case of inheritance. Please rename this column if you didn''t intend it to be used for storing the inheritance class or overwrite ActiveRecord::Base.inheritance_column to use another column for that information.: C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:897:in `instantiate_without_callbacks'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/callbacks.rb:215:in `instantiate'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:431:in `find_by_sql'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:431:in `find_by_sql'' zendesk.rb:85:in `get'' (eval):21:in `service'' (eval):44:in `run'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel/camping.rb:36:in `process'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel.rb:389:in `process_client'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel.rb:359:in `initialize'' C:/Program Files (x86)/ruby/lib/ruby/1.8/timeout.rb:56:in `timeout'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel.rb:358:in `initialize'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel.rb:356:in `initialize'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel.rb:355:in `initialize'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel/camping.rb:57:in `start'' zendesk.rb:218 After some spee-lunking around I know the sqlite master table has columns ''table'' and ''type''....from the error message I understand that ActiveRecord assumes these columns are used internally to allow STI or subclassing of Models.... I can''t see how to get my query to work. Hehe...I''m not 100% sure the information I want in the table is there even (db size, next index, ect.). ! Any thoughts or input is appreciated. I''m having fun nonetheless! david g. --------------------------------- Blab-away for as little as 1?/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice._______________________________________________ Camping-list mailing list Camping-list at rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list --------------------------------- Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2?/min or less. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060326/844d5e0e/attachment.htm
ok....so i have all the stats and stuff i want by using sqlite_analyzer from a exec call from within camping. I cant for the life of me get images to display from within my project. Tried: img :src => "#{URL()}/skins/image.png" and other similar hacks. The image tag created looks ok to me. I am using Mongrel under windows XP x64. as far as i can tell the images just dont load (I dont even get a broken image link in the page)... any suggestions...plz aided to extinguish my n00byness. :) David G. DG <blue_technx at yahoo.com> wrote: this does what I wanted: res = ZenDesk::Models::Base.connection.execute("SELECT * FROM sqlite_master") @db_stats = res.inspect render :admin_show anyone know how to get the sqlite version (if possible) from an sql statement. Eg. in mySQL "SELECT VERSION()"....can''t find a sqlite function to do it.... David G. DG <blue_technx at yahoo.com> wrote: Hi, I''m having fun playing around with Camping...I am slowly working on extending tepee to a personal e-notebook sort of tool (never lose my papers/revisions....hehe). I''ve given tepee an oswd css design, and am currently adding a admin page that I want to show the ruby version, sqlite version and db size and db stats information. I tried running: @db_stats = ZenDesk::Models::Base.find_by_sql("SELECT *! FROM sqlite_master") to see what information I could gleen from the master table and I got this error: ZenDesk::Controllers::Admin.GET ActiveRecord::SubclassNotFound The single-table inheritance mechanism failed to locate the subclass: ''table''. This error is raised because the column ''type'' is reserved for storing the class in case of inheritance. Please rename this column if you didn''t intend it to be used for storing the inheritance class or overwrite ActiveRecord::Base.inheritance_column to use another column for that information.: C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:897:in `instantiate_without_callbacks'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/callbacks.rb:215:in `instantiate'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:431:in `find_by_sql'' C:/Program! Files (x86)/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:431:in `find_by_sql'' zendesk.rb:85:in `get'' (eval):21:in `service'' (eval):44:in `run'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel/camping.rb:36:in `process'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel.rb:389:in `process_client'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel.rb:359:in `initialize'' C:/Program Files (x86)/ruby/lib/ruby/1.8/timeout.rb:56:in `timeout'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel.rb:358:in `initialize'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel.rb:356:in `initialize'' C:/Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel.rb:355:in `initialize'' C:/! Program Files (x86)/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel/camping.rb:57:in `start'' zendesk.rb:218 After some spee-lunking around I know the sqlite master table has columns ''table'' and ''type''....from the error message I understand that ActiveRecord assumes these columns are used internally to allow STI or subclassing of Models.... I can''t see how to get my query to work. Hehe...I''m not 100% sure the information I want in the table is there even (db size, next index, ect.). ! Any thoughts or input is appreciated. I''m having fun nonetheless! david g. --------------------------------- Blab-away for as little as 1?/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice._______________________________________________ Camping-list mailing list Camping-list at rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list --------------------------------- Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2?/min or less._______________________________________________ Camping-list mailing list Camping-list at rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list --------------------------------- Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060327/05b54821/attachment-0001.htm
Hey, David. If you figure out some handy SQLite tricks, please be my guest in adding it to the wiki: http://code.whytheluckystiff.net/camping/. DG wrote:> cant for the life of me get images to display from within my project. > Tried: > img :src => "#{URL()}/skins/image.png" and other similar hacks. The > image tag created looks ok to me. I am using Mongrel under windows XP > x64. as far as i can tell the images just dont load (I dont even get a > broken image link in the page)...If you''re using Mongrel, you can just mount your app at root and mount your images under its own directory. Like so: config = Mongrel::Configurator.new :host => "0.0.0.0" do listener :port => 3002 do uri "/", :handler => Mongrel::Camping::CampingHandler.new(Blog) uri "/favicon", :handler => Mongrel::Error404Handler.new("") uri "/images", :handler => Mongrel::DirHandler.new("/var/www/blog/images") trap("INT") { stop } run end end With the images mounted beneath the application, go ahead and use: img :src => "/skins/image.png" If you''re getting double slashes, update from SVN, that was a bug. _why
Thanks so much _why. Honestly I frequent your website at least once a day! :) The only thing I had to be sure to include in your example you gave was the config.join call. If I find any neat sqlite hacks I will post them (nothing great yet tho :/ thanx a bundle, David G. why the lucky stiff <why at whytheluckystiff.net> wrote: Hey, David. If you figure out some handy SQLite tricks, please be my guest in adding it to the wiki: http://code.whytheluckystiff.net/camping/. DG wrote:> cant for the life of me get images to display from within my project. > Tried: > img :src => "#{URL()}/skins/image.png" and other similar hacks. The > image tag created looks ok to me. I am using Mongrel under windows XP > x64. as far as i can tell the images just dont load (I dont even get a > broken image link in the page)...If you''re using Mongrel, you can just mount your app at root and mount your images under its own directory. Like so: config = Mongrel::Configurator.new :host => "0.0.0.0" do listener :port => 3002 do uri "/", :handler => Mongrel::Camping::CampingHandler.new(Blog) uri "/favicon", :handler => Mongrel::Error404Handler.new("") uri "/images", :handler => Mongrel::DirHandler.new("/var/www/blog/images") trap("INT") { stop } run end end With the images mounted beneath the application, go ahead and use: img :src => "/skins/image.png" If you''re getting double slashes, update from SVN, that was a bug. _why _______________________________________________ Camping-list mailing list Camping-list at rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list --------------------------------- Blab-away for as little as 1?/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060329/e6556789/attachment.htm