Turbo-charged counter caches for your Rails app. Huge improvements over the Rails standard counter caches: Updates counter cache when values change, not just when creating and destroying Supports counter caches through multiple levels of rela... 続きを読む
Rubycapistrano/capistrano ? GitHubnadarei/mina ? GitHubCapistrano多機能capify -> cap setup -> cap deployCapfile, config/deploy.rbバージョン管理しない共通ファイル/ディレクトリの管理に一工夫いる symlinkを張るタスクを定義する必要ありgit以外のSCM... 続きを読む
gem cleanupとすると2つ以上のバージョンがインストールされている gem について 最新以外のバージョンが削除される。実際には削除しないで、どの gem が削除されるのかを確認するには -d オプションをつける。gem cleanup -d 続きを読む
README.md MetaTags: a gem to make your Rails application SEO-friendly Search Engine Optimization (SEO) plugin for Ruby on Rails applications. Rails 3 MetaTags master branch now fully supports Rails 3 and is backward compatible. Installation A... 続きを読む
README.md Wicked PDF A PDF generation plugin for Ruby on Rails Wicked PDF uses the shell utility wkhtmltopdf to serve a PDF file to a user from HTML. In other words, rather than dealing with a PDF generation DSL of some sort, you simply write... 続きを読む
Ruby関わっているRailsアプリでPDF出力の要件があり、いくつかgemを試してみました。以前はPrawnを使いましたが、それとは異なるHTMLのPDF化というアプローチは魅力的に感じました。それぞれ深くは検証していませんが、雑感などまとめてみます。ちなみにすべてH... 続きを読む
ShareWisの開発で使われている便利なgemパッケージをまとめたいと思います。今回は主にView周りで活用しているgemパッケージをピックアップ! 更新日: 2012年11月08日RSS 続きを読む
Want that fancy CSS3 button look with none of the work? Then Sassy Buttons are for you! Easily create great looking, cross-browser compatible buttons with just a few lines of SASS and you’ll be in button heaven in no time. Getting Started Sa... 続きを読む
PaperTrail stores the values in the Model Before column. Most other auditing/versioning plugins store the After column. Choosing Attributes To Monitor You can ignore changes to certain attributes like this: class Article < ActiveRecord::Base ... 続きを読む
This means install the gem, but do not call require when you start Bundler. So you will need to manually call require "whenever" if you want to use the library. If you were to do gem "whenever", :require=>"whereever" then bundler would downlo... 続きを読む
ソースの中で定数として扱うのではなく、設定ファイル的に扱いたいRubyはそれなりに長い間使っていますが、Railsはメジャーバージョン毎にちょっと触るくらいで、まったくベストプラクティスとか知らないんですね。で、いまは作る際のお手本として 日本Ruby会議... 続きを読む
ruby, rvmRails3がリリースされているけど、まだまだ、Rails2系でうごいているアプリケーションも多い。RVMに備わっているgemsetという機能を使って、rails2系とrails3系の環境を整えてみた。こういうことができるようになるよ。 #ruby1.8.7 + rails2 rvm use 1... 続きを読む
Rubyのパッケージマネジメントシステムgem(Rubygems)のコマンド一覧 インストール # gem install パッケージバージョン検索 # gem search -r パッケージアップデート # gem update パッケージインストールリスト # gem list パッケージ消去(最新バージョンは残... 続きを読む
gemコマンドに-pオプションをつけることでproxy越しにgemコマンドを利用 ( ⊃Railをインストール) できるようになるが、プロキシに認証が必要な場合はこれに対応しない。 これに対応する方法を見つけたので、ここに書き留める。 * 情報ソース Anatol Pomozov’s... 続きを読む