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.