24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/launch_base/cli.rb', line 24
def new(project_path)
installed_rails_version = Utilities.get_rails_version
if installed_rails_version
if Utilities.rails_up_to_date?(installed_rails_version)
run "rails new #{project_path} -m #{gem_home}/templates/launch_base_default_template.rb"
else
say "Your current installation of Rails is outdated (#{installed_rails_version}). "\
"Please upgrade to Rails #{RAILS_VERSION}"
end
else
say "No installation of Rails found. Please install Rails #{RAILS_VERSION}"
end
end
|