普通はGemfile見ればいいんだけど、
それ以外で確認する方法ってパッと思いつくのはindex.htmlぐらい。
でも、最初に消すのでほとんどちゃんと見たことがない。
どうなってんのか気になったので軽くソースを追ってみた。
まずはindex.html
xhr.open("GET","rails/info/properties",false);
rails/info/propertiesへアクセスしています。 ブラウザで実行するとこんな感じ。
railties
railtiesのソースを見てます。 railties-3.2.12/lib/rails/info_controller.rb
class Rails::InfoController < ActionController::Base def properties if consider_all_requests_local? || request.local? render :inline => Rails::Info.to_html else render :text => '<p>For security purposes, this information is only available to local requests.</p>', :status => :forbidden end end protected def consider_all_requests_local? Rails.application.config.consider_all_requests_local end end
こんな感じ。localアクセスのときだけ表示させています。
Rails::Info (info.rb)
Rails::Info => About your application's environment Ruby version 1.9.3 (x86_64-darwin12.2.0) RubyGems version 1.8.23 Rack version 1.4 Rails version 3.2.12 JavaScript Runtime Node.js (V8) Active Record version 3.2.12 Action Pack version 3.2.12 Active Resource version 3.2.12 Action Mailer version 3.2.12 Active Support version 3.2.12 Middleware ActionDispatch::Static, Rack::Lock, #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x007f9d8b20b3d8>, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Reloader, ActionDispatch::Callbacks, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, ActionDispatch::Head, Rack::ConditionalGet, Rack::ETag, ActionDispatch::BestStandardsSupport Application root /Users/rochefort/work/rails/workshop/rails_projects/first_app Environment development Database adapter sqlite3 Database schema version 0