10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/niso/dependency.rb', line 10
def self.load(name)
begin
gem(name, all[name][:version])
require(all[name][:require])
rescue LoadError
if $!.to_s =~ /Gemfile/
Logger.error <<-EOS
Dependency missing: #{name}
Add this line to your application's Gemfile.
gem '#{name}', '#{all[name][:version]}'
Please try again after running "bundle install".
EOS
else
Logger.error <<-EOS
Dependency missing: #{name}
To install the gem, issue the following command:
gem install #{name} -v '#{all[name][:version]}'
Please try again after installing the missing dependency.
EOS
end
abort
end
end
|