now I use: echo ''app.get "/"''|./script/console production ========and,how to use ''app.get'' in rake file directly? -- Posted via http://www.ruby-forum.com/.
OK,try it in rakefile: =================require ''action_controller'' require ''console_app'' task :demo=>:environment do puts app.get "/" end =================-- Posted via http://www.ruby-forum.com/.
1>add :environment after task name(:demo) 2>then require ''console_app'' in block =============================task :demo=>:environment do require ''console_app'' puts app.get "/" #puts app.response.body end =============================that''s it! -- Posted via http://www.ruby-forum.com/.