Piers Cawley หนึ่งใน main developer ของ typo ออกมาพูดใน blog ตัวเอง
ถึงการหยุดนิ่งของ typo และยังมีการชมเชย Mephisto ที่มีการทำงานที่ดีกว่า typo ทำให้ developer ทำงานได้ง่ายด้วยการเขียน code ที่สะอาด
แต่ไม่นานมานี้ดูท่าจะมีการเปลี่ยนแปลงครั้งใหญ่กัน typo (และคงอีกหลายๆตัว) กับการมาของ rails 2.0 จะรอดีหรือจะ folk ดี หรือจะเขียนเองดีน้า….
อยากได้ plugin เหมือน jazzy ใน Mephisto ไปถาม punneng ดีกว่า
Posted by Revolution
Wed, 21 Nov 2007 05:19:22 GMT
Posted in ruby | Tags cms, rails, ruby, typo | no comments | no trackbacks
I’m a ruby programming hobbyist and doing rails hosting in Thailand especially ruby (and rails). Because in Thailand, there is nobody doing rails hosting. In fact, I fall in love with ruby as much as i written. One factor that make ruby grow up, there is a product that can release ruby and rails powers. So I decide to do Control panel for Rails hosting in ruby programming.
This project is base on vhcs2 concept with additional features. I draw some concept of control panel with freemind software
`2046200863' could not be displayed because:
uninitialized constant Flickr::XmlSimple
I call this project name “REDGEM” and now I opening project to rubyforge.org and get approve alrady. It can be accessed to redgem project
For rough concept, I separate work into 2 path
- Web Control Panel – It is written by Ruby on Rails. This part is interacted with user.
- Engine – It is also written by Ruby. The engine has responsibility to edit file configuration and deployment
For Future design, UI it may not be a web, it can be other or other language
As you see this is not easy one to do, I need help. Anyone can help me please let me know.
Thank You
File: redgem concept
ภาษาไทยข้างใน
Posted by Revolution
Mon, 19 Nov 2007 11:31:42 GMT
Posted in ruby, linux | Tags control panel, hosting, linux, rails, ruby | no comments | no trackbacks
พอดีมีทำ upload ทั้งรูปและไฟล์ pdf ด้วย file_column แต่มีการกำหนดไว้ว่าให้ resize รูปที่ขึ้นไป พอ upload pdf ก็เกิดปัญหานะสิเพราะมัน resize ทำ thumbnail ไม่ได้ (ที่จริงก็ได้แต่ยังไงไม่รู้) เพราะมันจะทำให้ WebBrick crash ไป และก็ขี้เกียจไปสร้างอันใหม่
code เดิม
validates_file_format_of :image, :in => ["gif", "jpg", "png","pdf"]
file_column :image, :magick => {
:versions => {
:thumb => {:crop => "1:1",
:size => "50x50!", :name => "thumb"},
}
}
ทุกไฟล์ที่ upload มันก็ทำ version ตามที่กำหนดไว้หมด แก้โดย
IMAGE_EXTENSIONS = {
"image/gif" => "gif",
"image/jpg" => "jpg",
"image/png" => "png"
}
OTHER_EXTENSIONS = {
"application/pdf" => "pdf",
"application/msword" => "doc",
"application/zip" => "zip",
"text/plain" => "txt",
"text/xml" => "xml",
"video/mpeg" => "mpeg",
"video/quicktime" => "mov",
}
file_column :image, :magick => {
:options => {:mime_extensions => IMAGE_EXTENSIONS},
:versions => {
:thumb => {:crop => "1:1",
:size => "50x50!", :name => "thumb"},
}
}
file_column( :image,
:options => {:mime_extensions => OTHER_EXTENSIONS})
ทำมันทั้งยังงี้ล่ะ เผื่อไฟล์อื่นจะได้ใช้ได้ด้วย ส่วน validates_file_format_of ก็เพื่มเอาเท่าที่ใช้
ไม่รู้ว่า act_as_attachment จะเป็นไงมั่ง แต่ตอนนี้สำหรับหผม file_column ยังโอเคอยู่
ที่มา
Posted by Revolution
Thu, 08 Nov 2007 16:58:56 GMT
Posted in ruby | Tags rails, tips, upload | no comments | no trackbacks
พอดีมีปัญหาเกี่ยวกับ log ใน rails ซึ่งมันก็กินเนื้อที่เยอะพอดูเลยพยามหาวิธีปิดมัน แต่สุดท้ายก็รู้ว่ามันปิดไม่ได้ เพราะ log มันเอาไว้ดูความเคลื่อนไหว ก็เลยได้แต่พยามหาวิธีให้มันเก็บน้อยลง ไปเจอที่ wiki ของ rails สรุปได้ว่า
ActiveRecord จะไปเรียกใช้ class Logger เพื่อจะทำการเก็บ log ลงไฟล์
ใน development จะใช้ :debug
ใน production จะใช้ :info
ซึ่งทั้งหมดก็มี :debug, :info, :warn, :error, :fatal ซึ่ง log class ของ ruby ยังมี :any แต่ไม่ทำงานบน rails ถ้าอยากให้ log น้อยลง เอาเฉพาะที่มี error ก็ใช้ :error
ให้เพิ่ม
config.log_level = :error
ลงในไฟล์
config/environment.rb
หรือถ้าจะปรับแต่งใดๆ ดูได้ที่ wiki ของ rails ครับ
Posted by Revolution
Mon, 05 Nov 2007 04:15:14 GMT
Posted in ruby | Tags logger, rails, ruby | no comments | no trackbacks
พอดีจะลง notebook ใหม่เลยลอง build source ของ libgems-ruby มาดู โดยไปเอา source มาจาก feisty มา build บน edgy โดยมีลำดับ
//เปิด feisty ใน source
#apt-get source rubygems
//ปิด feisty ใน source
#apt-get build-dep rubygems
//เปิด feisty ใน source
#apt-get source —build rubygems
แต่ว่ามันจะมี ติด dependency นิดหน่อยดูได้จากที่ ubuntu package
พอ build เสร็จก็ได้มา 2 ไฟล์
libgems-ruby1.8_0.9.0-5_all.deb
rubygems_0.9.0-5_all.deb
ไม่รู้ว่าเวลา build ทำไงให้มี version แบบที่เขาทำกันไม่เท่เลย
Posted by Revolution
Thu, 22 Mar 2007 06:46:31 GMT
Posted in ruby, linux | Tags deb, gem, ruby, ubuntu | no comments | no trackbacks
ปั้นเหน่งแนะนำมาว่า ใช้ "สูตรนี้":http://blog.innerewut.de/articles/2006/04/21/scaling-rails-with-apache-2-2-mod_proxy_balancer-and-mongrel
แก้ปัญหาการ deploy app ให้กับ ruby on rails ถ้าให้ดีต้องใช้ "capistrano":http://manuals.rubyonrails.com/read/book/17 + svn ด้วย
เด๋วว่างๆจะไป config ให้ดีๆขึ้น แล้วจะได้ทำ RoR hosting ให้คนไทยครับ
Posted by Revolution
Fri, 28 Jul 2006 11:13:00 GMT
Posted in ruby | no comments | no trackbacks
หาวิธีทำอยู่ ใครรู้ช่วยบอกที อยากจะเอา RoR หลายๆ App มารับบนเครื่องเดียวกัน ทำไงดีอ่ะ
ถามไว้อยู่ "ที่นี่":http://www.ruby-forum.com/topic/68332
พรุ่งนี้จะไป check ดูอีกที วันนี้อนดีกว่า
Update: ทำได้แล้วฮ่ะ ตอนนี้อยากหา _*CMS*_ ที่เขียนด้วย RoR มาลองใช้ ไม่อยากใช้ *Typo* เท่าไหร่เพราะมันให้คนอื่นช่วยเขียนไม่ได้ อยากได้แบบ Mambo ก็ยังดี
Posted by Revolution
Tue, 06 Jun 2006 17:57:00 GMT
Posted in ruby | 3 comments | no trackbacks
คิดๆดูแล้วอยากจะเปลี่ยน "Rubybox":http://www.rubybox.net จากเดิมที่ใช้ mambo อยู่เขียนด้วย php มาเป็น typo ซึ่งเขียนด้วย ruby on rails ที่ดูแล้วเหมาะกว่า ส่วน webboard ค่อยว่ากันใหม่
เอาไงดี
Posted by Revolution
Sun, 04 Jun 2006 16:15:00 GMT
Posted in Gerneral, ruby | no comments | no trackbacks
วันนี้ลองยิง revolution.rubybox.net ดู concurrent 100 session สรุปคือ ไม่รอครับ error 503 unavailable service แต่ process ทำงานต่อได้ สักพักก็ทำงานต่อได้ มันหมายความว่าต้อง turn ใช่ไหมเนี่ย ทำไงดี
Posted by Revolution
Sun, 14 May 2006 16:42:20 GMT
Posted in ruby | no comments | no trackbacks