Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit ccb15ec

Browse files
committed
Alert the user when using unsuported rails versions
Fixes #16
1 parent 9723daa commit ccb15ec

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

pathfinder.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def call
7070

7171
append_file 'Gemfile', "ruby \'#{utils.ask_with_default('Which version of ruby do you want to use?', default: RUBY_VERSION)}\'"
7272

73-
gem 'rails', utils.ask_with_default('Which version of rails do you want to use?', default: '4.2.5')
73+
gem 'rails', Rails.version
7474
# Model
7575
gem 'aasm'
7676
gem 'keynote'

template.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
if Rails.version[0].to_i >= 5
2+
puts ''
3+
puts "\e[31mPathfinder only works with Rails versions lower than 5.0.\e[0m"
4+
exit
5+
end
6+
17
path = if File.exists? @rails_template
28
File.dirname(@rails_template)
39
else

0 commit comments

Comments
 (0)