2007-12-01から1ヶ月間の記事一覧

has_ancestor plugin

has_ancestor is a Ruby on Rails plug-in that provides an implementation of Class Table Inheritance based on Rails Polymorphic Associations. The plugin adds two methods to ActiveRecord::Base, has_ancestor and has_descendants. Railsが提供す…

mongrel with gem 0.9.5

%RUBY_HOME%/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- %RUBY_HOME%/lib/ruby/gems/1.8/gems/mon grel-1.1.2-x86-mswin32-60/lib/mongrel/init.rb (MissingSourceFile) from %RUBY_HOME%/l…

Rails2.0.2のトラブルシューティング

If 0.9.5 is not the answer, do (you may not need to prefix with sudo, on OS X you do, some 窶蕨ix distributions too, but not Windows): sudo gem update --system これが重要

OSS技術者

dev

[OSS] 日本の技術者によるOSSの貢献が少ない理由 - WebStudio 「忙しすぎるから」。 ほそぼそとオープンソースやってる僕はまさにこれっす。でも、きっともっと忙しい人もいるはず。 日本のソフトウェアエンジニアのうち、一体何%の人が自分の意志でコードを…

JRuby1.0.3

JRuby 1.0.3 Releasedされてました。 ためしてみたら、先日困った問題 attributes_with_quotes must have 2 arguments in Rails2.0! ってわけで、本来あるべき引数を足してみました。 これも解決してました。

続けるってすごい

まさか、荒木先生と御一緒にジョジョ立ちを解説する日が来ようとはッ!文字通りのゴールド・エクスペリエンス(黄金体験)。ここまで来ると、もう現実のことなのか、スタンド攻撃で幻覚を見ていただけなのか、我が身のことながら分からない…!

JRuby on Rails2.0 jdbc_adapter

JRuby上で動かしていたRailsアプリを2.0に移行してみたら、 ArgumentError (wrong # of arguments(2 for 1)): C:/dev/jruby/jruby-1.0.2/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/active_record/transactions.rb:129:in `rollback_active_record_stat…

はてなRubyグループに

moduleでもオーバーライドっぽくっていうのを書いてみた。

define_methodで定義したメソッドへのブロック

って無視されちゃうのかな? irb(main):001:0> class A irb(main):002:1> define_method('foo') do irb(main):003:2* puts "block_given? ==> #{block_given?.inspect}" irb(main):004:2> # lambda.call irb(main):005:2* # ==> ArgumentError: tried to cre…

前に出る!

最近忙しいので作ったプラグインの公開とかも遅れてたり、プライベートな時間が少なかったりしてるんですけど、落ち着いて考えてみたら自分で何とかできる部分も結構あるわけで、自己管理の問題だなと気付きました。 自由(な時間)を勝ち取るために動こうと決…

RailsアプリをSubversionで管理する方法

This assumes that you have already created a subversion repository, and you are just wondering how to setup your rails project.If you have WEBrick or lighttpd running after running ???script/server??? in your rails directory, shutdown the …

Rails2.0 ビュー

ruby script/generate controllerでコントローラと一緒にビューを作ったら index.html.erbも作られました。試しにrhtmlも作ってみたら、ちゃんと動きました。共存してもOK。

Rails2.0 マイグレーション

def self.up create_table :events do |t| t.timestamps end endマイグレーションを生成してみたらこんなになっていた。tmiestampsってだいたい見当はつくけど、一応ActiveRecord::ConnectionAdapters::TableDefinitionを確認。 def timestamps column(:crea…

Rails2.0 rakeタスク

Rails 2.0 is finally finished after about a year in the making. 2.0が出たってことで色々試そうと思ってます。まずはざっくりrakeタスクの違いを見てみました。 rake db:abort_if_pending_migrations # Raises an error if there are pending migrations…

Rails2.0 config.breakpoint_server

******************************************************************* * config.breakpoint_server has been deprecated and has no effect. * *******************************************************************サーバーを起動すると、こんなメッセー…

Rails2.0 pagination

So how do I upgrade?If you want to move your application to Rails 2.0, you should first move it to Rails 1.2.6. That’ll include deprecation warnings for most everything we yanked out in 2.0. So if your application runs fine on 1.2.6 with n…

protocalendar.js

prototype.js ベースの日付選択用 javascript ライブラリ「protocalendar.js」を公開しました。 日付選択用のコントロールを提供するライブラリ。後で調べる。

iPhone on Rails2

http://www.slashdotdash.net/articles/2007/12/04/iphone-on-rails-creating-an-iphone-optimised-version-of-your-rails-site-using-iui-and-rails-2Rails2でiPhone用の画面を作る話。

Autocompleterを読む その3

http://d.hatena.ne.jp/akm/20071128#1196263081 http://d.hatena.ne.jp/akm/20071203#1196683131 の続きです。まだどんな風に表示するのか分かってないので、表示しそうな上下キーを押したときの処理から見ていきましょう。

Autocompleterを読む その2

http://d.hatena.ne.jp/akm/20071128#1196263081の続きです。今日は、動作する順番にソースコードを追ってみます。