This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rake aborted! | |
undefined local variable or method `zen' for main:Object | |
/home/sheng/playground/hello-zen/hello-zen/config/config.rb:20:in `<top (required)>' | |
/home/sheng/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
/home/sheng/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
/home/sheng/playground/hello-zen/hello-zen/app.rb:16:in `<top (required)>' | |
/home/sheng/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
/home/sheng/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
/home/sheng/playground/hello-zen/hello-zen/Rakefile:1:in `<top (required)>' | |
/home/sheng/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/lib/libmysqlclient.a | |
/usr/lib/libmysqlclient.so | |
/usr/lib/libmysqlclient.so.16 | |
/usr/lib/libmysqlclient.so.16.0.0 | |
/usr/lib/libmysqlclient_r.a | |
/usr/lib/libmysqlclient_r.so | |
/usr/lib/libmysqlclient_r.so.16 | |
/usr/lib/libmysqlclient_r.so.16.0.0 | |
/usr/share/doc/libmysqlclient-dev | |
/usr/share/doc/libmysqlclient16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
error do | |
'error' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra/base' | |
class MyBase < Sinatra::Base | |
disable :raise_errors | |
disable :show_exceptions | |
before do | |
if session.include? :visit | |
session[:visit] += 1 | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
#coding: utf-8 | |
require 'cuba' | |
Cuba.define do | |
on 'hello' do | |
res.write '罗晟第一次使用cuba' | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
simple.rb | |
========= | |
require 'sinatra' | |
use Rack::CommonLogger | |
get '/' do | |
'hello' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#coding=utf8 | |
# generate models definition automatically from database schema | |
# TODO add relationship between classes | |
from storm.locals import * | |
def class_name(table_name): | |
return '%s%s' % (table_name[0].upper(), table_name[1:]) |