Skip to content

Instantly share code, notes, and snippets.

@arnab
Created April 9, 2011 04:06
Show Gist options
  • Save arnab/911091 to your computer and use it in GitHub Desktop.
Save arnab/911091 to your computer and use it in GitHub Desktop.
Rails 3.0.6 Properties
# see https://github.com/rails/rails/blob/v2.0.2/railties/builtin/rails_info/rails/info.rb
@properties = {
:ruby => "#{RUBY_VERSION} (#{RUBY_PLATFORM})",
:rubygem => Gem::RubyGemsVersion,
:rails => Rails::VERSION::STRING,
:app_root => File.expand_path(RAILS_ROOT),
:env => RAILS_ENV,
:db_adapter => ActiveRecord::Base.configurations[RAILS_ENV]['adapter'],
:db_schema_version => (ActiveRecord::Migrator.current_version || nil),
}
# see https://github.com/rails/rails/blob/v3.0.6/railties/lib/rails/info.rb
@properties = {
:ruby => "#{RUBY_VERSION} (#{RUBY_PLATFORM})",
:rubygem => Gem::RubyGemsVersion,
:rack => ::Rack.release,
:rails => Rails::VERSION::STRING,
:app_root => File.expand_path(Rails.root),
:env => Rails.env,
:db_adapter => ActiveRecord::Base.configurations[Rails.env]['adapter'],
:db_schema_version => (ActiveRecord::Migrator.current_version || nil),
:middleware => Rails.configuration.middleware.map(&:inspect),
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment