<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6866451982454992694</id><updated>2011-11-27T17:00:50.183-08:00</updated><category term='firefox'/><category term='struts'/><category term='java'/><category term='rails'/><category term='activescaffold'/><category term='ajax_scaffold'/><category term='vm'/><category term='maven'/><category term='irb'/><category term='SyntaxHighlighter'/><category term='ubuntu'/><category term='extjs rails plugin'/><category term='cookie'/><category term='google'/><category term='rails javaeye'/><title type='text'>道阁</title><subtitle type='html'>只在此山中，云深不知处</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://daoge.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://daoge.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Dou YW</name><uri>http://www.blogger.com/profile/17738638762508586951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6866451982454992694.post-1051691031823276444</id><published>2007-06-20T22:29:00.000-07:00</published><updated>2007-06-20T22:42:26.371-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='cookie'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><title type='text'>如何阻止Google Analytics生成的Cookies?</title><content type='html'>Google Analytics会自动生成一些Cookies，类似：&lt;br&gt;
&lt;br&gt;
__utma=22912040.2101146157.1178589316.1181115988.1181178175.14; __utmz=22912040.1178589316.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); __utmb=22912040; __utmc=22912040
&lt;br&gt;&lt;br&gt;
这些信息是由下面的这个JS文件生成的：&lt;br&gt;
https://ssl.google-analytics.com/urchin.js&lt;br&gt;
&lt;br&gt;
只要将域google-analytics.com屏蔽掉即可阻止这些Cookies的生成。&lt;br&gt;
方法是：使用FireFox的NoScript插件。&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6866451982454992694-1051691031823276444?l=daoge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://daoge.blogspot.com/feeds/1051691031823276444/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6866451982454992694&amp;postID=1051691031823276444' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/1051691031823276444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/1051691031823276444'/><link rel='alternate' type='text/html' href='http://daoge.blogspot.com/2007/06/disable-google-analysys-cookie.html' title='如何阻止Google Analytics生成的Cookies?'/><author><name>Dou YW</name><uri>http://www.blogger.com/profile/17738638762508586951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6866451982454992694.post-6674698339263055716</id><published>2007-05-30T23:10:00.001-07:00</published><updated>2007-05-31T02:26:40.798-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SyntaxHighlighter'/><title type='text'>在BlogSpot中使用dp.SyntaxHighlighter</title><content type='html'>1、将&lt;a href="http://code.google.com/p/syntaxhighlighter/"&gt;dp.SyntaxHighlighter&lt;/a&gt;加入到blogspot.com
&lt;ul&gt;&lt;li&gt;将展开后的dp.SyntaxHighlighter代码上传到googlepages.com或其他可访问的地方&lt;/li&gt;&lt;li&gt;修改网页模板，将dp.SyntaxHighlighter的风格单及JavaScript&lt;a href="http://code.google.com/p/syntaxhighlighter/wiki/Usage"&gt;加入&lt;/a&gt;&lt;/li&gt;&lt;li&gt;将“转换断行”设为“否”（“修改设置”-〉“格式设定”-〉“转换断行”） 。&lt;span style="font-weight: bold;"&gt;但是这将影响已发布blog的格式，请慎重使用。&lt;/span&gt;
&lt;/li&gt;&lt;/ul&gt;2、使用方法参考dp.SyntaxHighlighter的&lt;a href="http://code.google.com/p/syntaxhighlighter/wiki/Usage"&gt;说明&lt;/a&gt; &lt;br/&gt;

3、替代方案： 使用&lt;a href="http://code.google.com/p/google-code-prettify/"&gt;Google code prettify&lt;/a&gt; &lt;br /&gt;

下面是对dp.SyntaxHighlighter的一个测试：

&lt;!-- InstanceBeginEditable name="Code" --&gt;
&lt;pre name="code" class="ruby"&gt;
# {tagname} {tagfile} {tagaddress}[;" {tagfield}..]
# "A tagfield has a name, a colon, and a value: "name:value".
# The name of the "kind:" field can be omitted.  A program reading the
# tags file can recognize the "kind:" field by the missing ':'.
  
class Parser
  @@parsers = []

  def get_type()
    return ""
  end
  
  def parse( xml )
   @var = nil
    return nil
  end

  def Parser.add_parser( :symlink )
    @@parsers.push( p )
  end
  def Parser.parsers()
    return @@parsers
  end
end

class RSSParser &lt; Parser
  def get_type()
    return "RSS"
  end
  
  def parse( xml )
    # Parse the XML up and return some known format
    return nil
  end
end

Parser.add_parser( RSSParser )

class RDFParser &lt; Parser
  def get_type()
    return "RDF"
  end
  
  def parse( xml )
    # Parse the XML up and return some known format
    return nil
  end
end

Parser.add_parser( RDFParser )
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6866451982454992694-6674698339263055716?l=daoge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://daoge.blogspot.com/feeds/6674698339263055716/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6866451982454992694&amp;postID=6674698339263055716' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/6674698339263055716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/6674698339263055716'/><link rel='alternate' type='text/html' href='http://daoge.blogspot.com/2007/05/test-syntax-highlighter.html' title='在BlogSpot中使用dp.SyntaxHighlighter'/><author><name>Dou YW</name><uri>http://www.blogger.com/profile/17738638762508586951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6866451982454992694.post-307677853884704751</id><published>2007-05-15T20:49:00.000-07:00</published><updated>2007-05-30T23:02:42.546-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>svn--版本化scaffold_resource生成文件的批处理脚本</title><content type='html'>scaffold_resource生成的文件有许多，在执行./script/generate scaffold_resource命令时添加选项“-c”可同时将这些文件添加到svn中。然则“-c”选项总是忘记输入，这时，你可以执行. /script/destroy scaffold_resource然后重新generate，但假如你已经对生成的文件作了一些修改或者许多修改，你就不愿或不能重新generate 了。下面的这段脚本可以帮助你走出这个困境:
&lt;div class="code_title"&gt;ruby 代码

&lt;pre name="code" class="ruby"&gt;

#!/usr/bin/env ruby

require 'rubygems'
require 'active_support/inflector'

@cmd = 'add'      # add, del, etc. run "svn help" for more.

# show usage
def usage
puts "Usage: #{$0} &lt;model&gt;"
puts "    -- svn #{@cmd} scaffold_resource files."
end

model = $*.shift
if model
model_singular_name = Inflector.singularize(model)
model_plural_name = Inflector.pluralize(model)

puts "model is [" + model_singular_name + "]"

filebase = File.dirname(__FILE__)
puts "filebase: " + filebase

files = ["app/views/#{model_plural_name}",
         "app/views/layouts/#{model_plural_name}.rhtml",
         "app/models/#{model_singular_name}.rb",
         "app/controllers/#{model_plural_name}_controller.rb",
         "test/functional/#{model_plural_name}_controller_test.rb",
         "app/helpers/#{model_plural_name}_helper.rb",
         "test/unit/#{model_singular_name}_test.rb",
         "test/fixtures/#{model_plural_name}.yml"
         ]

Dir["db/migrate/*create_#{model_plural_name}.{rb}"].each do |x|
#    puts x
  files &lt;&lt;&gt;  &lt;/model&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt; 

将上述代码保存到当前项目的根目录，文件名可取为svn-add.rb。然后执行 chmod +x svn-add.rb&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6866451982454992694-307677853884704751?l=daoge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://daoge.blogspot.com/feeds/307677853884704751/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6866451982454992694&amp;postID=307677853884704751' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/307677853884704751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/307677853884704751'/><link rel='alternate' type='text/html' href='http://daoge.blogspot.com/2007/05/svn-scaffoldresource.html' title='svn--版本化scaffold_resource生成文件的批处理脚本'/><author><name>Dou YW</name><uri>http://www.blogger.com/profile/17738638762508586951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6866451982454992694.post-1816220887095706062</id><published>2007-05-15T20:47:00.000-07:00</published><updated>2007-05-15T20:48:39.818-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='extjs rails plugin'/><title type='text'>一个ExtJs的Rails Plugin</title><content type='html'>本文介绍一个专门集成ExtJs到Rails的Plugin。ExtJs库是一个实用的一流Javascript库，相信许多人在看到它之后会爱不释手。对于Rails爱好者，则希望了解如何在Rails下使用它。下面介绍其使用：

该plugin功能概要：
&lt;ul&gt;&lt;li&gt;Easy to include ext files&lt;/li&gt;&lt;li&gt;Pagination&lt;/li&gt;&lt;li&gt;Scaffold&lt;/li&gt;&lt;li&gt;Tree (Not implemented yet)&lt;/li&gt;&lt;li&gt;and so on (Not implemented yet)&lt;/li&gt;&lt;/ul&gt; 1、安装
1）安装ext plugin：
&lt;pre&gt;cd vendor/plugins
svn co http://wota.jp/svn/rails/plugins/trunk/ext/&lt;/pre&gt; 2）安装依赖的plugins：
&lt;pre&gt;ruby script/plugin install http://wota.jp/svn/rails/plugins/branches/stable/dsl_accessor/
ruby script/plugin install http://wota.jp/svn/rails/plugins/branches/stable/named_options/&lt;/pre&gt; 3）安装extjs库

此处下载最新版的ExtJs，有三个adapter： jquery, prototype, yui

wget http://extjs.com/deploy/ext-1.0.1a.zip
unzip ext-1.0.1a.zip
cd public
ln -s ../ext-1.0.1a ext

基于Windows的用户可将ext-1.0.1a.zip直接展开到public目录，然后将目录ext-1.0.1a更名为ext。

2、修改ExtJs Plugin
该plugin是基于ext-1.0-alpha3而作的，稍加修改即可支持最新版ext-1.0.1a。
打开文件vendor/plugins/ext/lib/ext/helper.rb，将ext_include方法修改为： &lt;div class="code_title"&gt;ruby 代码&lt;/div&gt; &lt;div class="dp-highlighter"&gt; &lt;div class="bar"&gt; &lt;/div&gt; &lt;ol start="1" class="dp-rb"&gt;&lt;li class="alt"&gt;&lt;span&gt;&lt;span class="keyword"&gt;def&lt;/span&gt;&lt;span&gt; ext_include  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  array = []  &lt;/span&gt;&lt;/li&gt;&lt;li class="alt"&gt;&lt;span&gt;  array &lt;&lt; class="string"&gt;"#{ext_top}resources/css/ext-all"&lt;/span&gt;&lt;span&gt;)  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  array &lt;&lt; class="string"&gt;"#{ext_top}&lt;b&gt;adapter/yui/yui-utilities&lt;/b&gt;"&lt;/span&gt;&lt;span&gt;)  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="alt"&gt;&lt;span&gt;  array &lt;&lt; class="string"&gt;"#{ext_top}&lt;b&gt;adapter/yui/ext-yui-adapter&lt;/b&gt;"&lt;/span&gt;&lt;span&gt;)  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class="alt"&gt;&lt;span&gt;  &lt;span class="keyword"&gt;if&lt;/span&gt;&lt;span&gt; RAILS_ENV == 'development'  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    array &lt;&lt; class="string"&gt;"#{ext_top}ext-all-debug"&lt;/span&gt;&lt;span&gt;)  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="alt"&gt;&lt;span&gt;  &lt;span class="keyword"&gt;else&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    array &lt;&lt; class="string"&gt;"#{ext_top}ext-all"&lt;/span&gt;&lt;span&gt;)  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="alt"&gt;&lt;span&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class="alt"&gt;&lt;span&gt;  array &lt;&lt;&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  array &lt;&lt;&gt;&lt;/li&gt;&lt;li class="alt"&gt;&lt;span&gt;  array.join(&lt;span class="string"&gt;"\n"&lt;/span&gt;&lt;span&gt;)  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; &lt;/div&gt;
你也可以将adapter修改为jquery或prototype。查看public/ext/adapter/jquery或prototype目录下有哪些文件，参考上面的方法替换即可。

3、试用：
1） Migration:
&lt;div class="code_title"&gt;ruby 代码&lt;/div&gt; &lt;div class="dp-highlighter"&gt; &lt;div class="bar"&gt; &lt;/div&gt; &lt;ol start="1" class="dp-rb"&gt;&lt;li class="alt"&gt;&lt;span&gt;&lt;span&gt;create_table &lt;/span&gt;&lt;span class="symbol"&gt;:tomcats&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="keyword"&gt;do&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="variable"&gt;|t&lt;/span&gt;&lt;span&gt;|  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  t.column &lt;span class="symbol"&gt;:kname&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span class="symbol"&gt;:string&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="alt"&gt;&lt;span&gt;  t.column &lt;span class="symbol"&gt;:memo&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span class="symbol"&gt;:text&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; &lt;/div&gt;
2） 在Controller中添加 ext_paginate，不要含有其他方法。 &lt;div class="code_title"&gt;ruby 代码&lt;/div&gt; &lt;div class="dp-highlighter"&gt; &lt;div class="bar"&gt; &lt;/div&gt; &lt;ol start="1" class="dp-rb"&gt;&lt;li class="alt"&gt;&lt;span&gt;&lt;span class="keyword"&gt;class&lt;/span&gt;&lt;span&gt; TomcatsController &lt;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  ext_paginate Tomcat, 20,  &lt;/span&gt;&lt;/li&gt;&lt;li class="alt"&gt;&lt;span&gt;    &lt;span class="symbol"&gt;:cm&lt;/span&gt;&lt;span&gt; =&gt; Ext::Grid::ColumnModel.&lt;/span&gt;&lt;span class="keyword"&gt;new&lt;/span&gt;&lt;span&gt;([  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                       {&lt;span class="symbol"&gt;:dataIndex&lt;/span&gt;&lt;span&gt; =&gt; &lt;/span&gt;&lt;span class="string"&gt;"id"&lt;/span&gt;&lt;span&gt;       , &lt;/span&gt;&lt;span class="symbol"&gt;:width&lt;/span&gt;&lt;span&gt; =&gt; 100, &lt;/span&gt;&lt;span class="symbol"&gt;:header&lt;/span&gt;&lt;span&gt; =&gt; &lt;/span&gt;&lt;span class="string"&gt;"Thread ID"&lt;/span&gt;&lt;span&gt;},  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="alt"&gt;&lt;span&gt;                                       {&lt;span class="symbol"&gt;:dataIndex&lt;/span&gt;&lt;span&gt; =&gt; &lt;/span&gt;&lt;span class="string"&gt;"kname"&lt;/span&gt;&lt;span&gt;    , &lt;/span&gt;&lt;span class="symbol"&gt;:width&lt;/span&gt;&lt;span&gt; =&gt; 200, &lt;/span&gt;&lt;span class="symbol"&gt;:header&lt;/span&gt;&lt;span&gt; =&gt; &lt;/span&gt;&lt;span class="string"&gt;"Title"&lt;/span&gt;&lt;span&gt;},  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                       {&lt;span class="symbol"&gt;:dataIndex&lt;/span&gt;&lt;span&gt; =&gt; &lt;/span&gt;&lt;span class="string"&gt;"memo"&lt;/span&gt;&lt;span&gt;     , &lt;/span&gt;&lt;span class="symbol"&gt;:width&lt;/span&gt;&lt;span&gt; =&gt; 400, &lt;/span&gt;&lt;span class="symbol"&gt;:header&lt;/span&gt;&lt;span&gt; =&gt; &lt;/span&gt;&lt;span class="string"&gt;"Description"&lt;/span&gt;&lt;span&gt;},  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="alt"&gt;&lt;span&gt;                                      ])  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;span&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; &lt;/div&gt;
3） 如果routes.rb文件中有map.resources :tomcats，则注释掉。

4） 重新启动script/server，浏览http://localhost:3000/tomcats

参考：
&lt;ul&gt;&lt;li&gt;Ext Plugin: &lt;a href="http://wota.jp/ac/?date=20070406" _fcksavedurl="http://wota.jp/ac/?date=20070406"&gt;http://wota.jp/ac/?date=20070406&lt;/a&gt;&lt;/li&gt;&lt;li&gt;ExtJs: &lt;a href="http://extjs.com/download" _fcksavedurl="http://extjs.com/download"&gt;http://extjs.com/&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6866451982454992694-1816220887095706062?l=daoge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://daoge.blogspot.com/feeds/1816220887095706062/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6866451982454992694&amp;postID=1816220887095706062' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/1816220887095706062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/1816220887095706062'/><link rel='alternate' type='text/html' href='http://daoge.blogspot.com/2007/05/extjsrails-plugin.html' title='一个ExtJs的Rails Plugin'/><author><name>Dou YW</name><uri>http://www.blogger.com/profile/17738638762508586951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6866451982454992694.post-6468064618045443627</id><published>2007-05-15T20:39:00.000-07:00</published><updated>2007-05-15T20:46:09.030-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails javaeye'/><title type='text'>质疑JavaEye的野蛮删贴行为</title><content type='html'>来自javaeye.com的声音：

1个小时前，本人发的一个题为“Railscasts--免费的Rails视频教学”的帖子不见了踪影，这是为什么？本人发这个帖子的初衷是为了分享自己 的发现，促进国内Rails爱好者学习与使用Rails，没想到会被删贴，而且在自己的blog中也不见了踪影，这究竟是怎么回事？？？希望能得到一些解 释，也希望这个帖子不被野蛮删除！！！

建议： 删贴时不要彻底删除，去掉论坛里的链接即可，保留blog中的内容，保留blogger的劳动果实。
另外：给javaeye.com添加一个删贴通知功能应该不难吧，告知发贴人删贴原因。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6866451982454992694-6468064618045443627?l=daoge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://daoge.blogspot.com/feeds/6468064618045443627/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6866451982454992694&amp;postID=6468064618045443627' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/6468064618045443627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/6468064618045443627'/><link rel='alternate' type='text/html' href='http://daoge.blogspot.com/2007/05/javaeye.html' title='质疑JavaEye的野蛮删贴行为'/><author><name>Dou YW</name><uri>http://www.blogger.com/profile/17738638762508586951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6866451982454992694.post-3367853616479477650</id><published>2007-05-11T07:41:00.000-07:00</published><updated>2007-05-30T23:06:05.053-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>Fix theme_support in rails1.2.x</title><content type='html'>&lt;pre&gt;theme_support当前版本1.3.0不支持Rails1.2.x，需要修理一下方
可使用。

1、错误现象的产生：
执行下述命令：
&lt;code&gt;./script/generate theme default
&lt;/code&gt;将安装theme_support到vender/plugins，且创建themes目录后生成
default theme。
再次生成另一个theme，比如：another
&lt;code&gt;./script/generate theme another
&lt;/code&gt;将产生下述错误：
./script/../config/../vendor/plugins/theme_support/lib/
patches/routeset_ex.rb:26:in `create_theme_routes':
undefined method `named_route' for #&lt;actioncontroller::routing::routeset:0xb7aca4b0&gt; (NoMethodError)

2、解决方法：
1）修改
vendor/plugins/theme_support/lib/patches/routeset_ex.rb
文件，将draw方法替换为下述内容：
&lt;code&gt;  def draw
  clear!
  create_theme_routes
  yield Mapper.new(self)
  named_routes.install
&lt;/code&gt;&lt;/actioncontroller::routing::routeset:0xb7aca4b0&gt;&lt;code&gt;end&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;actioncontroller::routing::routeset:0xb7aca4b0&gt;在create_theme_routes方法中，
————替换named_route为add_named_route；
————替换connect为add_route。

也可以在&lt;a href="http://imaspy.com/files/theme_support_1.2.x.tar.gz"&gt;这里&lt;/a&gt;下载修改好的theme_support包。

2）修改
vendor/plugins/theme_support/lib/patches/actioncontroller_ex.rb
文件，添加下述内容：
&lt;pre name="code" class="ruby"&gt;
alias_method :__assert_existence_of_template_file, :assert_existence_of_template_file
def assert_existence_of_template_file(template_name)
  unless template_exists?(File.join( "../../themes/#{current_theme}", template_name))
    __assert_existence_of_template_file(template_name)
  end
end
&lt;/pre&gt;
上述方法在Rails1.2.3下测试通过。

参考：
&lt;a href="http://www.ruby-forum.com/topic/100163"&gt;http://www.ruby-forum.com/topic/100163&lt;/a&gt;
&lt;a href="http://www.mattmccray.com/pivot/archive.php?c=Theme_Support"&gt;http://www.mattmccray.com/pivot/archive.php?c=Theme_Support&lt;/a&gt;
&lt;a href="http://imaspy.com/news/read/5"&gt;http://imaspy.com/news/read/5&lt;/a&gt;
&lt;/actioncontroller::routing::routeset:0xb7aca4b0&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6866451982454992694-3367853616479477650?l=daoge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://daoge.blogspot.com/feeds/3367853616479477650/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6866451982454992694&amp;postID=3367853616479477650' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/3367853616479477650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/3367853616479477650'/><link rel='alternate' type='text/html' href='http://daoge.blogspot.com/2007/05/fix-themesupport.html' title='Fix theme_support in rails1.2.x'/><author><name>Dou YW</name><uri>http://www.blogger.com/profile/17738638762508586951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6866451982454992694.post-4155544245331165903</id><published>2007-05-01T04:03:00.000-07:00</published><updated>2007-05-01T06:41:22.110-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vm'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu 7.04 (Feisty Fawn)  on VMware</title><content type='html'>4月19日，ubuntu7.0.4正式发行了。如果你不打算自己从头安装，准备在虚拟机VMware下运行ubuntu server 7.0.4，可以选择下载现成的VMware applicance（见下文描述）。如果你喜欢GUI，也可以在此基础上安装GUI。

&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;0、前提条件： &lt;/span&gt;&lt;/span&gt;
安装了vmware的播放工具，可选下述任一款：
&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.vmware.com/products/player/"&gt;VMware Player&lt;/a&gt; &lt;b&gt;free!&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.vmware.com/products/server/"&gt;VMware Server&lt;/a&gt; &lt;b&gt;free!&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.vmware.com/products/ws/"&gt;VMware Workstation 5.5+&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.vmware.com/products/vi/esx/"&gt;VMware ESX 3+&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;本人使用的是VMware Server版。

&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;1、下载 Ubuntu Server 7.04 (Feisty Fawn) &lt;/span&gt;&lt;/span&gt;&lt;b&gt;
ubuntu-server-7.04-i386.zip&lt;/b&gt;, 189M  (点击&lt;a href="http://download.thoughtpolice.co.uk/ubuntu-server-7.04-i386.zip.torrent"&gt;此处&lt;/a&gt;)

 如果尚未有下载torrent格式文件的工具，则可下载&lt;span class="yellowbg"&gt;&lt;a href="http://www.utorrent.com/download.php"&gt;uTorrent&lt;/a&gt; (free!)&lt;/span&gt;

&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;2、配置与使用：&lt;/span&gt;&lt;/span&gt;

用户名： notroot     口令： thoughtpolice
注： 尚未安装 VMware Tools

&lt;span style="font-weight: bold;"&gt;2.1 改变控制台语言：&lt;/span&gt;
编辑  &lt;tt&gt;/home/notroot/.bash_profile
&lt;/tt&gt;加入&lt;tt&gt; export LANG=&lt;i&gt;de&lt;/i&gt;&lt;/tt&gt; (example given for German)
注： 不必执行这一步，写下这一步只为完整性。
&lt;dl style="font-weight: bold;"&gt;&lt;dt&gt;2.2 变更控制台键盘布局：&lt;/dt&gt;&lt;/dl&gt;&lt;dl style="text-align: left;"&gt;&lt;dt&gt;&lt;tt&gt;     sudo dpkg-reconfigure console-setup&lt;/tt&gt;&lt;/dt&gt;&lt;/dl&gt;  &lt;span style="font-weight: bold;"&gt;2.3 更新软件&lt;/span&gt;&lt;dl&gt;&lt;dd&gt;&lt;tt&gt;sudo aptitude update &lt;span class="black"&gt;# refresh apt's cache&lt;/span&gt;&lt;/tt&gt;
&lt;tt&gt; sudo aptitude upgrade &lt;span class="black"&gt;# run the upgrade&lt;/span&gt; &lt;/tt&gt;&lt;/dd&gt;&lt;/dl&gt;  &lt;dl&gt;&lt;dt style="font-weight: bold;"&gt;2.4 安装新软件&lt;/dt&gt;&lt;dd&gt;
&lt;/dd&gt;&lt;dd&gt;&lt;tt&gt; sudo aptitude update &lt;span class="black"&gt;# refresh apt's cache&lt;/span&gt;
aptitude search pkgnames &lt;span class="black"&gt;# lists all available software containing&lt;/span&gt;
aptitude search pkgnames | grep -i WORD &lt;span class="black"&gt;# lists all software containing WORD&lt;/span&gt;
sudo aptitude install PACKAGE &lt;span class="black"&gt;# installs PACKAGE (found from list above)&lt;/span&gt; &lt;/tt&gt;&lt;/dd&gt;&lt;/dl&gt;  &lt;dl&gt;&lt;dt style="font-weight: bold;"&gt;2.5 GUI在那里?&lt;/dt&gt;&lt;dd&gt;这个版本是server版，没有安装GUI。如果需要，可执行：
&lt;tt&gt;sudo aptitude install xorg gnome&lt;/tt&gt;&lt;/dd&gt;&lt;/dl&gt;  &lt;dl&gt;&lt;dt style="font-weight: bold;"&gt;2.6 文档与指导：&lt;/dt&gt;&lt;dd&gt;&lt;a href="https://wiki.ubuntu.com/FeistyFawn"&gt;Feisty Fawn wiki page&lt;/a&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;3、使用putty客户端连接到ubuntu server 7.0.4&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;        安装sshd：&lt;/span&gt;
           sudo apt-get install openssh-server
使用ifconfig查看IP地址，假定IP地址为： 192.168.0.100
&lt;span style="font-weight: bold;"&gt;       下载putty:&lt;/span&gt;
         &lt;a href="http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download.html"&gt;http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html&lt;/a&gt;  
运行putty.exe，输入上面的IP地址，回车后将出现登陆界面。输入用户名口令即可。

&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;新版ubuntu的一个特棒功能&lt;/span&gt;： 当系统发现运行的命令不存在时，将提示安装命令。这样解决了以往版本下包名记不准的苦恼。比如:

notroot@ubuntu:~$ emacs
The program 'emacs' can be found in the following packages:
* emacs21
* emacs-snapshot
* e3
* emacs-snapshot-nox
* emacs21-nox
* jove
* emacs-snapshot-gtk
Try: sudo apt-get install &lt;selected&gt;
Make sure you have the '&lt;span style="font-weight: bold;"&gt;universe&lt;/span&gt;' component enabled
-bash: emacs: command not found
notroot@ubuntu:~$

然后你可以选择安装emacs-snapshot-gtk，即：
sudo apt-get install emacs-snapshot-gtk

参考： &lt;a href="http://www.thoughtpolice.co.uk/vmware/#ubuntu7.04"&gt;http://www.thoughtpolice.co.uk/vmware/#ubuntu7.04&lt;/a&gt;&lt;/selected&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6866451982454992694-4155544245331165903?l=daoge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://daoge.blogspot.com/feeds/4155544245331165903/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6866451982454992694&amp;postID=4155544245331165903' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/4155544245331165903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/4155544245331165903'/><link rel='alternate' type='text/html' href='http://daoge.blogspot.com/2007/05/ubuntu-704-feisty-fawn-on-vmware.html' title='Ubuntu 7.04 (Feisty Fawn)  on VMware'/><author><name>Dou YW</name><uri>http://www.blogger.com/profile/17738638762508586951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6866451982454992694.post-7405145374385405320</id><published>2007-04-24T05:53:00.001-07:00</published><updated>2007-04-24T18:58:22.380-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='activescaffold'/><title type='text'>ActiveScaffold</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;ActiveScaffold的前身是AjaxScaffold。两者的一个重要区别：前者是一个Plugin，而后者是一个Generator。二者不兼容不能混用。下面介绍如何在你的项目中安装与使用ActiveScaffold、以及如何在本地运行该网站提供的Demo应用程序。

&lt;big&gt;&lt;b&gt;1、安装： &lt;/b&gt;&lt;/big&gt;（假定已经生成了一个Rails应用程序）

在该应用程序的当前目录下，执行
&lt;code&gt;./script/plugin install http://activescaffold.googlecode.com/svn/tags/active_scaffold&lt;/code&gt;

你也可以从trunk下取得active_scaffold的源代码：
&lt;code&gt;./script/plugin install http://activescaffold.googlecode.com/svn/trunk &lt;/code&gt;&lt;code&gt;active_scaffold&lt;/code&gt;

&lt;b&gt;&lt;big&gt;2、使用：&lt;/big&gt;&lt;/b&gt;

1） 使用 scaffold_resource生成基本的程序框架，以purchase为例：
./script/generate scaffold_resource purchase order_id:integer created_at:datetime amount:decimal

2） 修改布局模板：
将下述内容添加到purchases.rhtml
&lt;pre&gt;&lt;code class="ruby"&gt;&lt;%= javascript_include_tag &lt;span class="symbol"&gt;:defaults&lt;/span&gt; %&gt;
&lt;%= active_scaffold_includes %&gt;;&lt;/code&gt;&lt;/pre&gt; 3） 修改Controller：

打开purchases_controller.rb ，将原来自动生成的方法全部清空后，加入：
&lt;pre&gt;&lt;code class="ruby"&gt;active_scaffold :your_model_name&lt;your_model_name&gt;

例如：

&lt;/your_model_name&gt;&lt;/code&gt;&lt;code class="ruby"&gt;active_scaffold &lt;span class="symbol"&gt;:purchase&lt;/span&gt;&lt;/code&gt;
&lt;/pre&gt;4） 运行服务./script/server；然后打开浏览器，访问：&lt;pre&gt; http://&lt;your host=""&gt;&lt;your&gt;[your_server_host]:3000/purchases&lt;/your&gt;&lt;/your&gt;&lt;/pre&gt;
&lt;b&gt;&lt;big&gt;3、在本地运行ActiveScaffold的Demo应用程序&lt;/big&gt;&lt;/b&gt;

1) 下载Demo应用程序

svn co http://activescaffold.googlecode.com/svn/applications/demo/

2） 修改数据库配置config/database.yml

将原来的sqlite3改为使用mysql数据库；然后创建数据库；运行"rake db:migrate"。

3） 运行服务./script/server；然后打开浏览器，访问： http://[your_server_host]:3000

参考： &lt;a href="http://activescaffold.com/"&gt;http://activescaffold.com/&lt;/a&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6866451982454992694-7405145374385405320?l=daoge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://daoge.blogspot.com/feeds/7405145374385405320/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6866451982454992694&amp;postID=7405145374385405320' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/7405145374385405320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/7405145374385405320'/><link rel='alternate' type='text/html' href='http://daoge.blogspot.com/2007/04/activescaffold.html' title='ActiveScaffold'/><author><name>Dou YW</name><uri>http://www.blogger.com/profile/17738638762508586951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6866451982454992694.post-6770857890546707183</id><published>2007-04-01T06:06:00.000-07:00</published><updated>2007-04-01T06:27:07.440-07:00</updated><title type='text'>SourceForge企业版</title><content type='html'>许多人都知道sourceforge.net是世界上最大的开源网站，并且从sf.net下载过软件或源代码。但似乎很少有人了解sf的项目管理软件也是非常棒的。尤其是对于那些大的项目，由分散在各地的项目小组一起开发完成，一个鲁棒的协作软件就显得尤为重要。

点击&lt;a href="http://sourceforge.net/powerbar/sfee/"&gt;这里&lt;/a&gt;免费下载SourceForge企业版（15个用户）
 610 MB - VMware Virtual Appliance - English Language

点击&lt;a href="http://www.vasoftware.com/gateway/SFEE_demo_flash.php"&gt;这里&lt;/a&gt;观看介绍（flash）&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6866451982454992694-6770857890546707183?l=daoge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://daoge.blogspot.com/feeds/6770857890546707183/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6866451982454992694&amp;postID=6770857890546707183' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/6770857890546707183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/6770857890546707183'/><link rel='alternate' type='text/html' href='http://daoge.blogspot.com/2007/04/sourceforge.html' title='SourceForge企业版'/><author><name>Dou YW</name><uri>http://www.blogger.com/profile/17738638762508586951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6866451982454992694.post-6771366366270676104</id><published>2007-03-14T08:28:00.001-07:00</published><updated>2007-03-14T08:44:27.375-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='irb'/><title type='text'>irb的好东西</title><content type='html'>irb是 interactive ruby 的缩写。在你的rails项目下执行ruby script/console将进入irb界面，执行'"exit"命令可退出irb。
&lt;ol&gt;&lt;li&gt;&lt;a href="http://slash7.com/articles/2006/12/21/secrets-of-the-rails-console-ninjas"&gt;irb使用起步&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://pablotron.org/software/wirble/"&gt;irb色彩化&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://drnicwilliams.com/2006/10/12/my-irbrc-for-consoleirb/"&gt;啥方法？&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.dominiek.com/articles/2007/03/05/destroying-the-wall-between-writing-and-executing-code"&gt;irb忍者&lt;/a&gt;
&lt;/li&gt;&lt;/ol&gt;
来源： &lt;a href="http://www.infoq.com/news/2007/03/rails-ninja-irb-hacks"&gt;http://www.infoq.com/news/2007/03/rails-ninja-irb-hacks&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6866451982454992694-6771366366270676104?l=daoge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://daoge.blogspot.com/feeds/6771366366270676104/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6866451982454992694&amp;postID=6771366366270676104' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/6771366366270676104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/6771366366270676104'/><link rel='alternate' type='text/html' href='http://daoge.blogspot.com/2007/03/irb_14.html' title='irb的好东西'/><author><name>Dou YW</name><uri>http://www.blogger.com/profile/17738638762508586951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6866451982454992694.post-356173430600857880</id><published>2007-03-10T00:04:00.002-08:00</published><updated>2007-03-12T23:48:06.476-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='struts'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><title type='text'>使用maven2起步学习struts2</title><content type='html'>1、下载maven2
http://apache.mirrors.tds.net/maven/binaries/maven-2.0.5-bin.tar.gz

2、安装配置maven2环境：
主要是设置环境变量PATH。可以使用自定义的批处理文件，也可以使用系统的环境变量设置。

3、执行mvn archetype:create创建struts2应用程序，如下：
&lt;pre class="code-java"&gt;mvn archetype:create   -DgroupId=tutorial \
                -DartifactId=tutorial \
                -DarchetypeGroupId=org.apache.struts \
                -DarchetypeArtifactId=struts2-archetype-starter \
                -DarchetypeVersion=2.0.5-SNAPSHOT \
                -DremoteRepositories=http:&lt;span class="code-comment"&gt;//people.apache.org/repo/m2-snapshot-repository&lt;/span&gt;&lt;/pre&gt;
目前的版本为2.0.5-SNAPSHOT。注意DOS下运行时，将上面的"\"去掉后确信没有回车符号。
查看"&lt;a href="http://people.apache.org/repo/m2-snapshot-repository/org/apache/struts/struts2-archetype-starter/"&gt;最新版本&lt;/a&gt;"

4、运行
进入新建项目的根目录：
cd tutorial
然后运行：
mvn jetty:run

5、创建eclipse项目需要的两个文件，然后在eclipse下导入。
mvn eclipse:eclipse

6、FAQ
1) 在eclipse下打开项目，类路径找不到。怎么办？
在eclipse中增加环境变量M2_REPO。
2) 执行mvn jetty:run后，总是出错。
检查是否有其他占用8080端口的Web Container，如Tomcat在运行。

7. 其他例子
参考&lt;a href="http://appfuse.org/display/APF/AppFuse+QuickStart"&gt;appfuse2 QuickStart&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6866451982454992694-356173430600857880?l=daoge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://daoge.blogspot.com/feeds/356173430600857880/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6866451982454992694&amp;postID=356173430600857880' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/356173430600857880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/356173430600857880'/><link rel='alternate' type='text/html' href='http://daoge.blogspot.com/2007/03/maven2struts2_5008.html' title='使用maven2起步学习struts2'/><author><name>Dou YW</name><uri>http://www.blogger.com/profile/17738638762508586951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6866451982454992694.post-3817509798161273816</id><published>2007-02-20T21:23:00.000-08:00</published><updated>2007-03-12T23:50:11.393-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>ubuntu6.10 server版下部署appfuse1.9.4</title><content type='html'>本篇描述appfuse在ubuntu6.10 server版下的部署过程。尚缺具体的操作步骤，如有需要，可进行补充。

I、系统环境：
ubuntu server 6.10

II、安装前的准备
以下是安装时用到的程序包，你可以下载自己需要的版本。
1. 下载必须的jdk：j2dk1.5、
2. 下载web服务器：tomcat5.5.9
3. 下载编译工具ant：ant1.7.0
4. 下载测试工具junit: junit4.1
5. 下载appfuse1.9.4

III、开始安装
1. 安装jdk、tomcat、ant，并将junit.jar拷贝到ANT_HOME/lib目录
[目录结构]
&lt;pre&gt;
   HOME/jwork/
        |-- appservers
        |   |-- jakarta-tomcat-5.5.9
        |   |-- tomcat         # a link 
        |-- tools
        |   |-- ant            # a link
        |   |-- apache-ant-1.7.0
&lt;/pre&gt;
[设置环境变量]
在HOME/.bashrc文件中添加下述内容：
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
export TOMCAT_HOME=~/jwork/appservers/tomcat
export CATALINA_HOME=~/jwork/appservers/tomcat
export CLASSPATH=$TOMCAT_HOME/common/lib/jsp-api.jar:$TOMCAT_HOME/common/lib/servlet-api.jar
export ANT_HOME=~/jwork/tools/ant

export PATH=$PATH:$ANT_HOME/bin

[编辑命令]
可使用下述命令进行编辑：
$ nano .bashrc

2. 安装mysql5
sudo apt-get install mysql-server

3. 编译appfuse1.9.4
---------------------
1) 建立一个mysql用户test.
$ mysql -uroot
mysql&gt; create user test identified by "test";
mysql&gt; quit
$

2) 编译appfuse
减压 appfuse-1.9.4-src.zip，然后在展开的appfuse目录下执行ant命令：
$ ant

注： 运行ant -p可查看该项目的所有选项

3) 创建appfuse数据库
在展开的appfuse目录下执行ant setup-db命令：
$ ant setup-db

IV、运行
1. 将appfuse.war拷贝到TOMCAT_HOME/webapps目录下
2. 启动tomcat
3. 打开浏览器，导航到http://&lt;your server="" ip="" or="" name=""&gt;:8080/appfuse

4. appfuse的两个预装用户：
  tomcat/tomcat
  mraible/tomcat

结束！&lt;/your&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6866451982454992694-3817509798161273816?l=daoge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://daoge.blogspot.com/feeds/3817509798161273816/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6866451982454992694&amp;postID=3817509798161273816' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/3817509798161273816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/3817509798161273816'/><link rel='alternate' type='text/html' href='http://daoge.blogspot.com/2007/02/ubuntu610-serverappfuse194.html' title='ubuntu6.10 server版下部署appfuse1.9.4'/><author><name>Dou YW</name><uri>http://www.blogger.com/profile/17738638762508586951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6866451982454992694.post-1282935516384108251</id><published>2006-12-24T01:02:00.000-08:00</published><updated>2006-12-24T01:07:49.571-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>Rails1.1.6 Plugins 仓库地址</title><content type='html'>可以在下述地址找到与Rails1.1.6兼容的Plugins:

svn://rubyforge.org/var/svn/redhillonrails/tags/release-1.1.6/vendor/plugins

See &lt;a href="http://www.redhillconsulting.com.au/blogs/simon/archives/000376.html"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6866451982454992694-1282935516384108251?l=daoge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://daoge.blogspot.com/feeds/1282935516384108251/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6866451982454992694&amp;postID=1282935516384108251' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/1282935516384108251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/1282935516384108251'/><link rel='alternate' type='text/html' href='http://daoge.blogspot.com/2006/12/rails116-plugins.html' title='Rails1.1.6 Plugins 仓库地址'/><author><name>Dou YW</name><uri>http://www.blogger.com/profile/17738638762508586951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6866451982454992694.post-5288163483196837855</id><published>2006-11-24T17:42:00.000-08:00</published><updated>2006-11-24T17:58:16.678-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ajax_scaffold'/><title type='text'>Tutorials for the Ajax Scaffold Plugin</title><content type='html'>&lt;ol&gt;&lt;li&gt;&lt;a href="http://blog.caronsoftware.com/articles/2006/09/02/getting-started-with-the-ajax-scaffold-plugin"&gt;Getting Started with the Ajax Scaffold Plugin&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.caronsoftware.com/articles/2006/09/05/defining-custom-columns-with-ajax-scaffold-plugin"&gt;Custom Columns for the Ajax Scaffold Plugin&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.caronsoftware.com/articles/2006/09/06/extending-the-ajax-scaffold-plugin"&gt;Extending the Ajax Scaffold Plugin&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.caronsoftware.com/articles/2006/10/28/dynamic-columns-with-ajax-scaffold"&gt;Dynamic Columns for the Ajax Scaffold Plugin&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;a href="http://blog.caronsoftware.com/articles/2006/10/28/dynamic-columns-with-ajax-scaffold"&gt;
&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6866451982454992694-5288163483196837855?l=daoge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://daoge.blogspot.com/feeds/5288163483196837855/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6866451982454992694&amp;postID=5288163483196837855' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/5288163483196837855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6866451982454992694/posts/default/5288163483196837855'/><link rel='alternate' type='text/html' href='http://daoge.blogspot.com/2006/11/several-links-for-ajax-scaffold.html' title='Tutorials for the Ajax Scaffold Plugin'/><author><name>Dou YW</name><uri>http://www.blogger.com/profile/17738638762508586951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
