Archive for November, 2008
DataMapper, the ruby object relational mapper
website: http://www.datamapper.org
git: git://github.com/sam/dm-core.git
mail: http://groups.google.com/group/datamapper
now: http://www.twitter.com/datamapper
Setting up a Connection
DataMapper.setup(:default, “adapter://user:password@hostname/dbname”)
supported adapters: mysql, sqlite3, postgres, sqlite3::memory:
additional adapters are in dm-more, (couchdb, rest, imap, [...]
#context-back,
#context-forward,
#context-reload,
#context-stop,
#context-sep-stop,
#context-bookmarkpage,
#context-savepage,
#context-sendpage,
#context-sep-viewbgimage,
#context-openlink,
#context-sep-open,
#context-bookmarklink,
#context-sendlink,
#context-sep-copyimage,
#context-sendimage,
#context-setWallpaper,
#context-printpage,
#context-smartsearch
{ display: none !important; }
早期的Merb在Windows上安装是件很恶心的事,缺这少那的,很是不爽,Merb 1.0也正式发布了,今天正好系统重做了一下,在干净的环境下试了一把,Merb 1.0可以正常安全与运行,相比之前版本的安装好些了,但也不省事,必要安装的Gem包还是一大堆,啥时候能和Rails一样安装Rails会自动把相关包一并安装啊,或许这就是Merb可定制化这样的特点对于我这个懒人的不适应吧!
安装必要的Gem
extlib
erubis
json_pure
rspec
rack
mime-types
thor
ruby2ruby(ZenTest RubyInline sexp_processor ParseTree)
templater(diff-lcs)
haml
mailfactory
dm-core(addressable data_objects)
dm-migrations
dm-timestamps
dm-aggregates
dm-validations
dm-sweatshop
dm-types
do_sqlite3
注意:括号里的gem是被附加安装的,可以不用手动安装
首先要在确保Merb App的$approot$/autotest/discover.rb文件中加载了”merb”, “rspec”。
discover.rb内容如下
Autotest.add_discovery { “merb” }
Autotest.add_discovery { “rspec” }
安装必要的依赖包
$: sudo apt-get install libgtk2-ruby libnotify-dev
$: wget http://rubyforge.org/frs/download.php/27134/ruby-libnotify-0.3.3.tar.bz2
$: tar jxf ruby-libnotify-0.3.3.tar.bz2
$: cd ruby-libnotify-0.3.3/
$: ruby extconf.rb
$: make && sudo make install
停止Alsa-util
$ sudo /etc/init.d/alsa-utils stop
编辑配置文件
$ sudo gedit /var/lib/alsa/asound.state
将如下内容添加至文件顶部
# This text should be added to the beginning of
# /var/lib/alsa/asound.state. You only need to add
# it once — it is saved across reboots.
pcm.asymed {
type asym
playback.pcm dmix
capture.pcm dsnoop
}
pcm.default {
type plug
slave.pcm asymed
}
pcm.dmix {
type dmix
ipc_key 5678293
ipc_key_add_uid yes
slave {
pcm ‘hw:0,0′
period_time 0
period_size 128
buffer_size 2048
format S16_LE
rate 48000
}
}
pcm.dsnoop {
type dsnoop
ipc_key 5778293
ipc_key_add_uid yes
slave {
pcm ‘hw:0,0′
period_time [...]
Merb - a much heralded, highly flexible Ruby-based Web application framework - has reached version 1.0 after two years of development. Congratulations to Merb’s creator, Ezra Zygmuntowicz, and to the large group of associated developers (such as Yehuda Katz and Matt Aimonetti) who’ve kept adding features and pushed Merb forward to be a significant alternative [...]
scp -Pport -p account@host:/files/path /local/path
-P(大写)端口参数
-p(小写)保持文件更改及相关的操作属性不变











