Redmineチューニングの実際と限界(旧資料) - Redmine performance tuning(old), See Below.Kuniharu(州晴) AKAHANE(赤羽根)
『るびま』は、Ruby に関する技術記事はもちろんのこと、Rubyist へのインタビューやエッセイ、その他をお届けするウェブ雑誌です。 Rubyist Magazine について 『Rubyist Magazine』、略して『るびま』は、Rubyist の Rubyist による、Rubyist とそうでない人のためのウェブ雑誌です。 最新号 Rubyist Magazine 0063 号 バックナンバー Rubyist Magazine 0063 号 Rubyist Magazine 0062 号 Kaigi on Rails 特集号 RubyKaigi Takeout 2020 特集号 Rubyist Magazine 0061 号 Rubyist Magazine 0060 号 RubyKaigi 2019 直前特集号 Rubyist Magazine 0059 号 Rubyist
「サポートしている」とは、カラムのデータ型に指定すると使用しているデータベースの適切な型にマッピングされるということです。 例えばデータベースに PostgreSQL を使用しているとすると、string は VARCHAR(255)、integer は INTEGER にマッピングされます。 先ほどの users テーブルを作成するマイグレーションをもう一度取り上げます。 class CreateUsers < ActiveRecord::Migration def up # ユーザ情報を保持する users テーブルを作成する. create_table :users do |table| # 名前. table.string :name, :null => false # メールアドレス. table.string :email, :null => false # 年齢. table
以前SinatraからDataMapperを使う記事を書いたけど、今回はSinatraのO/Rマッパー部分にActiveRecord 3を使ってみる。ActiveRecord 3自体の使い方については、この記事がすごくわかりやすかった。 Sinatraアプリに必要なファイルを用意する まずは、Sinatraアプリを実行するのに必要な最低限のファイル群(Gemfile, config.ru, app.rb)を作成する。今回は基本的にすべてBundler経由で操作するので、システム側にBundlerのgemがインストールされている必要がある。 Gemfile 今回使用するgemはこんな感じ。とりあえずSinatraでActiveRecord 3を使う場合はactiverecordとsinatra-activerecordとsqlite3が必要で、今回使ったバージョンはそれぞれ、3.0.6、0.
以前すこしだけpryについて書きましたが、 (【Rails】RailsコンソールがPryで起動できる「pry-rails」 - 記すに足らず。) 恥ずかしながら最近やっとpryを使ってデバッグするようになったので 超基本的なことですがメモっておきます! pry 使い方は下記参照!! わかりやすくまとめてありますー 〜参考になりました!!〜 #280 Pry with Rails - RailsCasts ブレークポイントでpry実行 rubyコード内に、以下のように記述するとその場所に到達した時pryが起動します(ブレークポイント) binding.pry pry-nav pry-navというgemを使うと、 デバッグ実行するための以下のコマンドが使えるようになります。 next:1行すすめる step:1行すすめる(関数の中も追う) continue:処理の再開 ただ毎回stepとか入力
2012/7/16 10:00 指摘によりsinatra-contribを使う旨を追記&修正 未だにshotgun使ってた。 参考: モノクロームの中: sinatra (2) - オートリロード - Sinatra::Reloader (part of Sinatra::Contrib) gemをインストール % gem install sinatra-contrib Classicスタイル require "sinatra" require "sinatra/reloader" if development? Modularスタイル require "sinatra/base" require "sinatra/reloader" class MyApp < Sinatra::Base configure :development do register Sinatra::Reload
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く