Free Japanese prefecture icons
Here are some icons I created of some prefectures in Japan. The prefectures are Tokyo, Aomori, Hyogo, Kyoto, Okinawa and Shimane . They are in png format (256×256) and you are free to reuse them, but a link back to here would be appreciated. To download, just right click and select Save As. If anyone has a request for one of the other 41 prefectures, just leave a comment and I’ll make one when I have time. I chose these prefectures for various random reasons. For example, Shimane is the home to the Ruby language which is what we do most of our web development on, and Okinawa is my favourite place in Japan. [UPDATE: Added 3 more prefectures, Iwate, Fukuoka and Nagasaki, as requested in the comments]
[JRuby on Rails on GAE/J] how-to put rubygems into a jar file to get around file limitations
GAE (Google App Engine) has a limit number to the number files you can upload. To get around this limit, we need to compress rubygems into jar files. There may not be easy way to load rubygems in jar files with JRuby. But with JRuby on GAE/J, it’s easy to load. JRuby on Rails on GAE/J, can load rubygems in RAILS_ROOT/vendor/gems, just do require “gem-name”. But rubygems often contain a lot of files and that can eat into the quota pretty quickly. JRuby on GAE/J, can load rubygems from jar files. Therefore it makes sense to put rubygems into jar files, and I am going to show you how step by step. Steps: install rubygems into a specific temporary directory (not into the system dir) use -i option to install rugygems into a temporary...
How To Use Email To Create And Reply To Forums on Redmine
We’re using Redmine not only as a BTS (Bug Tracking System), but also as a project management tool. We used combination of Basecamp and Trac until October but now we’re trying to decide on a single tool to manage projects and issues. Of course we’ll keep using Basecamp for some projects but it seems better to use only one tool to reduce management costs. Redmine is my answer. It’s a BTS and a collaboration tool. One huge disadvantage of Redmine when I compare it with Basecamp was email updating feature. There is no good solution on Redmine to create and reply to forum messages. Email discussions are important for messaliberty. So I wrote some code to use the email – forum messages feature on Redmine 0.8.5. First of all, I found...
[Rails] use DataTime class with ActiveRecord column
ActiveRecord’s :datetime corresponds to ruby Time class. But Time class can’t use old timestamps like 0001-01-01 00:00:00. (ActiveRecord converts 0001-01-01 00:00:00 to 2001:01:01 00:00:00.) So overwrite ActiveRecord to use DateTime class with :datetime. Test Environment: Ubuntu 9.04 ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux] rails 2.3.2 – 2.3.4 mysql Ver 14.12 Distrib 5.0.75, for debian-linux-gnu (i486) using readline 5.2 Just put following code active_record_datetime_ext.rb into RAILS_ROOT/config/initializers # -*- coding: utf-8 -*- # ActiveRecord column data type :datetime corresponds to ruby Time class. # # class CreateTasks < ActiveRecord::Migration # def self.up # create_table :tasks do |t| # t.column :title, ...
[Ruby on Rails] Didn't apply edited view file
With Ruby on Rails 2.3.2 Sometimes, edit rails view file like app/view/users/edit.html.erb, but didn’t apply it. Draws page with old (before edit) view. Reason In app/view/* directory, like app/view/users, there might be files like edit.html.erb.~BASE~ ends with “.html.erb.*”. Then rails draw pages with view file that ends with “.*”. svn (subversion) makes .~BASE~ files when compare working file with old revision file. How to resolve remove .*~BASE~ files like this: % cd project_dir % find . -name "*html.*" ./app/views/userss/edit.html.erb.~BASE~ ./app/views/userss/show.html.erb.~BASE~ % find . -name "*.~BASE~" -exec rm {} \;

