web framework camping's problem

H

hwang is

hi all,

sorry, i know that this site is ruby forum.
but , i don't find that camping's forum or mailing list.


camping and rails's code style is similar.

i want create table and column .
and it's just i want to print on the my web page.

but, occurs error.
error is ...

Camping Problem!
Artest::Controllers::Index.GET
ActiveRecord::StatementInvalid SQLite3::SQLException: no such table:
artest_users: SELECT * FROM "artest_users" :

this error is what's mean?

this is my code...

#!ruby
#!usr/lib/ruby -rubygems
require 'camping'

Camping.goes :Artest

module Artest::Models
class User < Base; end

class CreateTheBasics < V 1.0
def self.up
create_table :artest_users do |t|
t.column :post, :text
end
User.create :post => 'wow'

end

def self.down
drop_table :artest_users
end
end


end

module Artest::Controllers
class Index < R '/'
def get

@usr = User.find :all
render :index
end
end
end

module Artest::Views
def layout
html do
body do
title {"aa"}
self << yield
end
end
end

def index
h1 @usr.post
end
end

def Artest.create
Camping::Models::Session.create_schema
Artest::Models.create_schema :assume => 1.0
end


plz , teach me.
thanks for reading my article.
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top