Denkinovelという、ノベルゲーム風の小説を書ける投稿サイトをRails + Herokuで開発しています。 サービスの特性上assetsに多くの画像、音楽ファイルを置いているので、HerokuのSlug size 200MB縛りがきつくなってきました。こんな状況のためにasset_syncというgemがあるので、使ってみることにしました。Heroku公式で推奨しているgemです。 herokuでのasset_syncの使い方は、英語公式がこちら。https://devcenter.heroku.com/articles/cdn-asset-host-rails31 ボランティアによる日本語訳もあります。ありがたい。こちらです。https://github.com/herokaijp/devcenter/wiki/cdn-asset-host-rails31 インストール herok
Fog で S3 の期限付き URL を取得したい場合は、Fog::Storage::AWS::File#url を使用すればよい。有効期限となる時刻は引数で指定する。 require 'active_support/core_ext' require 'fog' fog_storage = Fog::Storage.new(aws_settings) bucket = fog_storage.directories.get(bucket_name) file = bucket.get(path) expire_time = 30.second.since file.url(expire_time)
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に上げる設定をしてください。 あと画像のリ
rubyで画像アップロード機能を作成するには様々なgemがありますが、carrierwaveが一番お手軽でわかりやすいので一番使っています。 carrierwaveではストレージを自由に選択できるので、ストレージをfogにすればS3との連携も簡単にできます。 以下の例は管理しているrailsアプリケーションのストレージをfogにする設定です。 CarrierWave.configure do |config| config.cache_dir = "#{Rails.root}/tmp/uploads" config.fog_credentials = { :provider => 'AWS', :aws_access_key_id => 'YOUR ACCESS KEY', :aws_secret_access_key => 'YOUR SECRET', :region => 'ap-no
Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news. fog is a Ruby gem by Wesley Beary to control a variety of cloud services through a unified API. It deals with both server cloud and storage based services and supports Amazon S3 and Rackspace Files; as well as servers and on Amazon EC2, Rackspace Servers, Terremark vCloud and Slicehost. Support is also available for Amazon
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く