Rubyの高機能なREPLであるpryとマルチクラウド対応ライブラリのfogを利用して、簡単に複数のクラウドを扱うことができます。 TL;DR pryとfogを組み合わせるとクラウドの操作に補完・シンタックスハイライト・履歴・Rubyの配列操作などが使え非常に便利 fogが提供しているインターフェースにより異なるサービスでも同じコマンドで操作できる 仮想マシンだけでなくオブジェクトストレージ、DNS、CDNも扱える 準備 pryとfogをインストールしておきます。 ライブラリのインストール Pry::Commands.create_command "fog" do description "Connect to the service provider using Fog" command_options :keep_retval => true banner <<-BANNER Usag
Did you know that you can navigate the posts by swiping left and right? Awesome! 31 Dec 2012 . category: . Comments All successful projects grow. In the beginning we usually don’t care about scalability so much. The need of it comes often suddenly. You cannot predict effects of being advertised on popular blog or going viral. Then you need to scale up to serve the traffic. There are many options t
asset_sync gem error :( The first error I started out with was related to the unf gem, so I added gem "unf", "~> 0.1.3" to my gemfile and tried things again. No luck :( After more research I may have an issue with another setting related to my aws bucket. My dns is hosted via route53 and I wanted to use a custom domain to serve my assets. This means my bucket will look like assets.domain.com inste
ども、マイケル(日本人)です。 調子がいいのでブログ連投してみます。 carrierwaveでめっちゃはまったのでその話を書きます。 carrierwave便利なんですがちょっといじるとすぐはまりますね。。。 やりたいこと carrierwaveのキャッシュファイルはlocalに、実画像はS3に置く(その際画像はjpgに変換) nginxで動的にサムネイル生成してcloudFrontでキャッシュさせたものをアプリ側で読み込む ちなみにnginx等のインフラ周りの設定については書きません。 なぜならインフラ構築したのは僕じゃないから(`・ω・´) うちのスーパーインフラエンジニア様が3秒でやってくれました、もしかしたらブログに書いてくれるかもしれません。 画像UPLOAD実装 んでは早速実装していきましょう。 まずはドキュメントみてS3に上げる設定をしてください。 あと画像のリ
最近、私は仕事でChefを使いました。Chefの中のKnifeと呼ばれるコマンドラインツールでは、幾つかのクラウドサービスに対応しています。 Launch Cloud Instances with Knife - Chef - Opscode Open Source Wiki それはRubyのライブラリ「fog」を利用することで実現していました。 そこで第1回目の今回から数回に分けて、このfogについて調べたことを書いてみようと思います。 参考になるサイト まずはfogの公式サイトとRubyGems.orgです。 fog - The Ruby cloud services library fog | RubyGems.org | your community gem host また最近、Engine Yardのブログにおいて、fogの作者であるgeemus (Wesley Beary)さん
In math, a unary operation is an operation with a single input. In Ruby, a unary operator is an operator which only takes a single ‘argument’ in the form of a receiver. For example, the – on -5 or ! on !true. In contrast, a binary operator, such as in 2 + 3, deals with two arguments. Here, 2 and 3 (which become one receiver and one argument in a method call to +). Ruby only has a handful of unary
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く