質問編集履歴
3
gemfilの中身を追加致しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
Errorは特にでていないと思います。
|
12
12
|
|
13
13
|
### 該当のソースコード
|
14
|
-
|
14
|
+
```
|
15
15
|
app/assets/stylesheets/setting.scss
|
16
16
|
|
17
17
|
@font-face {
|
@@ -40,8 +40,8 @@
|
|
40
40
|
font-family:'huwahuwa';
|
41
41
|
font-weight:500;
|
42
42
|
}
|
43
|
-
|
43
|
+
```
|
44
|
-
|
44
|
+
```ここに言語を入力
|
45
45
|
gemfil
|
46
46
|
|
47
47
|
source 'https://rubygems.org'
|
@@ -118,6 +118,8 @@
|
|
118
118
|
gem 'devise'
|
119
119
|
gem 'image_processing'
|
120
120
|
|
121
|
+
```
|
122
|
+
|
121
123
|
### 試したこと
|
122
124
|
|
123
125
|
Ruby on Railsで作成したアプリケーションをawsやHerokuにデプロイした時、
|
2
gemfilの中身を追加致しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -41,6 +41,83 @@
|
|
41
41
|
font-weight:500;
|
42
42
|
}
|
43
43
|
|
44
|
+
|
45
|
+
gemfil
|
46
|
+
|
47
|
+
source 'https://rubygems.org'
|
48
|
+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
49
|
+
|
50
|
+
ruby '2.5.1'
|
51
|
+
|
52
|
+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
53
|
+
gem 'rails', '~> 5.2.1'
|
54
|
+
# Use mysql as the database for Active Record
|
55
|
+
#gem 'mysql2', '>= 0.4.4', '< 0.6.0'
|
56
|
+
# Use Puma as the app server
|
57
|
+
gem 'puma', '~> 3.11'
|
58
|
+
# Use SCSS for stylesheets
|
59
|
+
gem 'sass-rails', '~> 5.0'
|
60
|
+
# Use Uglifier as compressor for JavaScript assets
|
61
|
+
gem 'uglifier', '>= 1.3.0'
|
62
|
+
# See https://github.com/rails/execjs#readme for more supported runtimes
|
63
|
+
# gem 'mini_racer', platforms: :ruby
|
64
|
+
|
65
|
+
# Use CoffeeScript for .coffee assets and views
|
66
|
+
gem 'coffee-rails', '~> 4.2'
|
67
|
+
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
|
68
|
+
gem 'turbolinks', '~> 5'
|
69
|
+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
70
|
+
gem 'jbuilder', '~> 2.5'
|
71
|
+
# Use Redis adapter to run Action Cable in production
|
72
|
+
# gem 'redis', '~> 4.0'
|
73
|
+
# Use ActiveModel has_secure_password
|
74
|
+
# gem 'bcrypt', '~> 3.1.7'
|
75
|
+
|
76
|
+
# Use ActiveStorage variant
|
77
|
+
# gem 'mini_magick', '~> 4.8'
|
78
|
+
|
79
|
+
# Use Capistrano for deployment
|
80
|
+
# gem 'capistrano-rails', group: :development
|
81
|
+
|
82
|
+
# Reduces boot times through caching; required in config/boot.rb
|
83
|
+
gem 'bootsnap', '>= 1.1.0', require: false
|
84
|
+
|
85
|
+
group :development, :test do
|
86
|
+
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
87
|
+
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
|
88
|
+
gem 'mysql2', '>= 0.4.4', '< 0.6.0'
|
89
|
+
end
|
90
|
+
|
91
|
+
group :production do
|
92
|
+
gem 'pg', '0.20.0'
|
93
|
+
gem 'rails_12factor'
|
94
|
+
end
|
95
|
+
|
96
|
+
group :development do
|
97
|
+
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
|
98
|
+
gem 'web-console', '>= 3.3.0'
|
99
|
+
gem 'listen', '>= 3.0.5', '< 3.2'
|
100
|
+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
101
|
+
gem 'spring'
|
102
|
+
gem 'spring-watcher-listen', '~> 2.0.0'
|
103
|
+
end
|
104
|
+
|
105
|
+
group :test do
|
106
|
+
# Adds support for Capybara system testing and selenium driver
|
107
|
+
gem 'capybara', '>= 2.15'
|
108
|
+
gem 'selenium-webdriver'
|
109
|
+
# Easy installation and use of chromedriver to run system tests with Chrome
|
110
|
+
gem 'chromedriver-helper'
|
111
|
+
end
|
112
|
+
|
113
|
+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
114
|
+
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
115
|
+
gem 'mini_magick'
|
116
|
+
gem 'carrierwave'
|
117
|
+
gem 'kaminari'
|
118
|
+
gem 'devise'
|
119
|
+
gem 'image_processing'
|
120
|
+
|
44
121
|
### 試したこと
|
45
122
|
|
46
123
|
Ruby on Railsで作成したアプリケーションをawsやHerokuにデプロイした時、
|
1
試したことを追加しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -50,6 +50,31 @@
|
|
50
50
|
heroku run bundle exec rake assets:precompile RAILS_ENV=production -a アプリ名
|
51
51
|
を実行してみましたが変わりませんでした。
|
52
52
|
|
53
|
+
|
54
|
+
|
55
|
+
ご回答いただいた方をヒントに(コメント欄に詳細あります)Error↓
|
56
|
+
|
57
|
+
Mysql2::Error::ConnectionError: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
|
58
|
+
|
59
|
+
を改善すべく、$heroku addons:add heroku-postgresqlを実行して、
|
60
|
+
$ heroku run rails db:migrateをしてみましたが
|
61
|
+
|
62
|
+
LoadError: Error loading the 'postgresql' Active Record adapter. Missing a gem it depends on? pg is not part of the bundle. Add it to your Gemfile.
|
63
|
+
|
64
|
+
というErrorがでました。そもそもpostgresqlの設定をしていないと思いましたので、
|
65
|
+
gemfileにpostgresqlを追加し、$ sudo yum install postgresql-develを実行、
|
66
|
+
$bundle installをしてみましたら、
|
67
|
+
|
68
|
+
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
|
69
|
+
|
70
|
+
An error occurred while installing pg (0.20.0), and Bundler cannot continue.
|
71
|
+
Make sure that `gem install pg -v '0.20.0' --source 'https://rubygems.org/'` succeeds before bundling.
|
72
|
+
|
73
|
+
In Gemfile:
|
74
|
+
pg
|
75
|
+
|
76
|
+
のErrorが出てきて、今まで確認できていたブラウザもApplication Errorで確認できなくなってしまいました。
|
77
|
+
|
53
78
|
### 補足情報(FW/ツールのバージョンなど)
|
54
79
|
|
55
80
|
|