9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/make_it_so/rails/prerequisite_check.rb', line 9
def check
say "Checking Rails version...", :yellow
begin
require "rails"
puts ::Rails.version
if ::Rails.version != MakeItSo::Rails::VERSION
say "Rails versions check FAILED - execute the following", :red
say "gem uninstall rails railties activejob actionmailer -a && gem install rails -v #{MakeItSo::Rails::VERSION}"
return false
else
say "Rails version MATCH", :green
return true
end
rescue LoadError => e
say "Rails not installed", :red
return false
end
end
|