Amazon EC2 lets us deploy our Rails applications into the cloud and to scale them on demand by adding or removing service instances. Deploying directly to EC2 gives us a lot of control over the server setup and can be more affordable than other cloud services. That said it puts a lot more work and responsibility in our court, but there is a gem called Rubber that can help us with this. This is a g
しかし、コードに変更を加えるごとにrakeコマンドを実行しなくてはいけないのが少し面倒です。一連の大きなテストの場合、修正が1、2個のファイルだけだったとしてもすべてのテストが終了するのを待たなくてはいけません。これを自動化できる方法があれば便利でしょう。 この問題を解決するツールはいくつかあります。今回のエピソードではGuardを見ていくことにしましょう。このツールは、ファイルの修正を監視して、修正が行われたらある動作を実行します。多様な環境でGuardを利用できるようにするために多くの機能拡張があります。今回利用するRSpec用では、ファイルの修正を監視して修正があったらspecを実行します。RSpecの代わりにTest::Unitを使用しているのであれば、そのための機能拡張もあります。その他にもCucumber、minitestなど多くの環境向けの機能拡張があります。 インストール
$ rails g active_admin:install invoke devise generate devise:install create config/initializers/devise.rb create config/locales/devise.en.yml ================================================================== Some setup you must do manually if you haven't yet: 1. Setup default url options for your specific environment. Here is an example of development environment: config.action_mailer.default_url
Download: source codeProject Files in Zip (100 KB)mp4Full Size H.264 Video (19.6 MB)m4vSmaller H.264 Video (10.2 MB)webmFull Size VP8 Video (12.2 MB)ogvFull Size Theora Video (23.6 MB) Railsアプリケーションで、モデルデータに基づいてカスタムのJSONデータを返したい場合、これを行う方法はいくつかあります。モデルのas_jsonメソッドをオーバーライドするか、エピソード320でおこなったようにJbuilder gemを使用することができます。もう一つよく使われるのが、RABL gemを用いる方法です。RABLはRuby API Builder Languageの略で、その他のツールと比べると若干機能が豊富
Add full text searching using ElasticSearch and Tire. Here I will show the steps involved in adding this search to an existing application. This is the first part in a two part series.
watch on iTunes follow on Twitter follow on Facebook subscribe to RSS feed RailsCasts is produced by Ryan Bates (rbates on Twitter and ryanb on GitHub). A free episode will be released on the first Monday of each month featuring tips and tricks with Ruby on Rails. The screencasts are short and focus on one technique so you can quickly move on to applying it to your own project. The topics target t
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く