rails
PDFを出す際にcontrollerに以下のオプションを付ける。 render :pdf => 'filename', :header => { :right => '[page] of [topage]' }
find /home/foo/.rbenv -type f -name "bootstrap-dropdown.js" -exec emacsclient {} \; 55-57行目をコメントアウト (当然ながら)本番環境はasset compileが必要
さくらクラウド(Ubuntu14.04)でnginx, rails unicornを利用した際に以下の様なログが出る場合がある 2015/01/01 12:12:12 [error] 8652#0: *228 connect() failed (111: Connection refused) while connecting to upstream, client: 111.111.111.111, server…
サイト Rails Composer 新しいアプリの作成 rails new foo -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb こんなことが出来る Deviseの導入 Bootstrapの導入 Postgresの指定、設定ファイル自動生成 Google Analyticsの設定 develo…
例:4000番ポートを指定する場合 config/boot.rbに以下を追記する require 'rails/commands/server' module Rails class Server def default_options super.merge({ :Port => 4000, }) end end end