7
8
9
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# File 'lib/generators/init_generator.rb', line 7
def add_gems_needed
desc "Adding the gems and models needed for base work"
puts "Adding Bootstrap gem..."
gem 'bootstrap', '~> 5.3.3'
puts "Running bundle install..."
Bundler.with_clean_env { run 'bundle install' }
puts "Adding Devise gem..."
gem 'devise'
Bundler.with_clean_env { run 'bundle install' }
puts "Now installing Devise..."
generate 'devise:install'
puts "Creating User model with Devise..."
generate 'devise User role:integer first_name:string last_name:string bio:text website:string twitter:string facebook:string instagram:string dob:date street:string city:string state:string'
puts "Running db migration for user"
rake 'db:migrate'
puts "Adding CanCanCan gem..."
gem 'cancancan'
Bundler.with_clean_env { run 'bundle install' }
puts "Adding ActionText gem..."
gem 'actiontext'
Bundler.with_clean_env { run 'bundle install' }
puts "Installing Action Text..."
generate 'action_text:install'
rake 'db:migrate'
end
|