File: ruby_version_check.rb

package info (click to toggle)
ruby-railties-3.2 3.2.6-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,808 kB
  • sloc: ruby: 6,217; makefile: 10
file content (23 lines) | stat: -rw-r--r-- 572 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
if RUBY_VERSION < '1.8.7'
  desc = defined?(RUBY_DESCRIPTION) ? RUBY_DESCRIPTION : "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE})"
  abort <<-end_message

    Rails 3 requires Ruby 1.8.7 or 1.9.2.

    You're running
      #{desc}

    Please upgrade to continue.

  end_message
elsif RUBY_VERSION > '1.9' and RUBY_VERSION < '1.9.2'
  $stderr.puts <<-end_message

    Rails 3 doesn't officially support Ruby 1.9.1 since recent stable
    releases have segfaulted the test suite. Please upgrade to Ruby 1.9.2.

    You're running
      #{RUBY_DESCRIPTION}

  end_message
end