質問編集履歴
5
$ bundle installしたことの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -50,7 +50,7 @@
|
|
50
50
|
|
51
51
|
gem 'bootsnap', require: false
|
52
52
|
|
53
|
-
と入力してから再度rails new実行し、エラーなく完了しました。
|
53
|
+
と入力してから$ bundle installし、再度rails new実行し、エラーなく完了しました。
|
54
54
|
|
55
55
|
|
56
56
|
|
4
エラー内容貼り付けミス修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -60,127 +60,7 @@
|
|
60
60
|
|
61
61
|
$ rails s
|
62
62
|
|
63
|
-
Usage:
|
64
|
-
|
65
|
-
rails new APP_PATH [options]
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
Options:
|
70
|
-
|
71
|
-
[--skip-namespace], [--no-skip-namespace] # Skip namespace (affects only isolated applications)
|
72
|
-
|
73
|
-
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
|
74
|
-
|
75
|
-
# Default: /Users/taka/.rbenv/versions/2.6.6/bin/ruby
|
76
|
-
|
77
|
-
-m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL)
|
78
|
-
|
79
|
-
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/postgresql/sqlite3/oracle/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
|
80
|
-
|
81
|
-
# Default: sqlite3
|
82
|
-
|
83
|
-
[--skip-gemfile], [--no-skip-gemfile] # Don't create a Gemfile
|
84
|
-
|
85
|
-
-G, [--skip-git], [--no-skip-git] # Skip .gitignore file
|
86
|
-
|
87
|
-
[--skip-keeps], [--no-skip-keeps] # Skip source control .keep files
|
88
|
-
|
89
|
-
-M, [--skip-action-mailer], [--no-skip-action-mailer] # Skip Action Mailer files
|
90
|
-
|
91
|
-
[--skip-action-mailbox], [--no-skip-action-mailbox] # Skip Action Mailbox gem
|
92
|
-
|
93
|
-
[--skip-action-text], [--no-skip-action-text] # Skip Action Text gem
|
94
|
-
|
95
|
-
-O, [--skip-active-record], [--no-skip-active-record] # Skip Active Record files
|
96
|
-
|
97
|
-
[--skip-active-storage], [--no-skip-active-storage] # Skip Active Storage files
|
98
|
-
|
99
|
-
-P, [--skip-puma], [--no-skip-puma] # Skip Puma related files
|
100
|
-
|
101
|
-
-C, [--skip-action-cable], [--no-skip-action-cable] # Skip Action Cable files
|
102
|
-
|
103
|
-
-S, [--skip-sprockets], [--no-skip-sprockets] # Skip Sprockets files
|
104
|
-
|
105
|
-
[--skip-spring], [--no-skip-spring] # Don't install Spring application preloader
|
106
|
-
|
107
|
-
[--skip-listen], [--no-skip-listen] # Don't generate configuration that depends on the listen gem
|
108
|
-
|
109
|
-
-J, [--skip-javascript], [--no-skip-javascript] # Skip JavaScript files
|
110
|
-
|
111
|
-
[--skip-turbolinks], [--no-skip-turbolinks] # Skip turbolinks gem
|
112
|
-
|
113
|
-
-T, [--skip-test], [--no-skip-test] # Skip test files
|
114
|
-
|
115
|
-
[--skip-system-test], [--no-skip-system-test] # Skip system test files
|
116
|
-
|
117
|
-
[--skip-bootsnap], [--no-skip-bootsnap] # Skip bootsnap gem
|
118
|
-
|
119
|
-
[--dev], [--no-dev] # Setup the application with Gemfile pointing to your Rails checkout
|
120
|
-
|
121
|
-
[--edge], [--no-edge] # Setup the application with Gemfile pointing to Rails repository
|
122
|
-
|
123
|
-
[--rc=RC] # Path to file containing extra configuration options for rails command
|
124
|
-
|
125
|
-
[--no-rc], [--no-no-rc] # Skip loading of extra configuration options from .railsrc file
|
126
|
-
|
127
|
-
[--api], [--no-api] # Preconfigure smaller stack for API only apps
|
128
|
-
|
129
|
-
-B, [--skip-bundle], [--no-skip-bundle] # Don't run bundle install
|
130
|
-
|
131
|
-
--webpacker, [--webpack=WEBPACK] # Preconfigure Webpack with a particular framework (options: react, vue, angular, elm, stimulus)
|
132
|
-
|
133
|
-
[--skip-webpack-install], [--no-skip-webpack-install] # Don't run Webpack install
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
Runtime options:
|
138
|
-
|
139
|
-
-f, [--force] # Overwrite files that already exist
|
140
|
-
|
141
|
-
-p, [--pretend], [--no-pretend] # Run but do not make any changes
|
142
|
-
|
143
|
-
-q, [--quiet], [--no-quiet] # Suppress status output
|
144
|
-
|
145
|
-
-s, [--skip], [--no-skip] # Skip files that already exist
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
Rails options:
|
150
|
-
|
151
|
-
-h, [--help], [--no-help] # Show this help message and quit
|
152
|
-
|
153
|
-
-v, [--version], [--no-version] # Show Rails version number and quit
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
Description:
|
158
|
-
|
159
|
-
The 'rails new' command creates a new Rails application with a default
|
160
|
-
|
161
|
-
directory structure and configuration at the path you specify.
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
You can specify extra command-line arguments to be used every time
|
166
|
-
|
167
|
-
'rails new' runs in the .railsrc configuration file in your home directory.
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
Note that the arguments specified in the .railsrc file don't affect the
|
172
|
-
|
173
|
-
defaults values shown above in this help message.
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
Example:
|
178
|
-
|
179
|
-
rails new ~/Code/Ruby/weblog
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
|
63
|
+
/Users/taka/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:95:in `rescue in load': Webpacker configuration file not found /Users/taka/workspace/TF_MAP/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ rb_sysopen - /Users/taka/workspace/TF_MAP/config/webpacker.yml (RuntimeError)
|
184
64
|
|
185
65
|
```
|
186
66
|
|
@@ -240,6 +120,10 @@
|
|
240
120
|
|
241
121
|
→ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin19]
|
242
122
|
|
123
|
+
→ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-darwin19]
|
124
|
+
|
125
|
+
|
126
|
+
|
243
127
|
Rails 6.0.2.2
|
244
128
|
|
245
129
|
データベースはMySQLです
|
3
bootsnapエラーの解消後の状況
test
CHANGED
File without changes
|
test
CHANGED
@@ -30,58 +30,202 @@
|
|
30
30
|
|
31
31
|
|
32
32
|
|
33
|
+
<追記1>
|
34
|
+
|
35
|
+
→rubyのバージョンを2.5.0→2.7.1に更新、rails newしたところboot.rbは作成されました。
|
36
|
+
|
37
|
+
しかし、下記のようにbootsnap/setupがないとエラーが発生しました。
|
38
|
+
|
39
|
+
```
|
40
|
+
|
41
|
+
/Users/taka/workspace/TF_MAP/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError)
|
42
|
+
|
43
|
+
```
|
44
|
+
|
45
|
+
<追記2>
|
46
|
+
|
47
|
+
bootsnapがないとのことなので、Gemfileに
|
48
|
+
|
49
|
+
gem "rails"
|
50
|
+
|
51
|
+
gem 'bootsnap', require: false
|
52
|
+
|
53
|
+
と入力してから再度rails new実行し、エラーなく完了しました。
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
しかしながら、この後、rails sを実行しましたが、http://localhost:3000/へブラウザアクセスしても起動しない状態になっています。
|
58
|
+
|
59
|
+
```
|
60
|
+
|
61
|
+
$ rails s
|
62
|
+
|
63
|
+
Usage:
|
64
|
+
|
65
|
+
rails new APP_PATH [options]
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
Options:
|
70
|
+
|
71
|
+
[--skip-namespace], [--no-skip-namespace] # Skip namespace (affects only isolated applications)
|
72
|
+
|
73
|
+
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
|
74
|
+
|
75
|
+
# Default: /Users/taka/.rbenv/versions/2.6.6/bin/ruby
|
76
|
+
|
77
|
+
-m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL)
|
78
|
+
|
79
|
+
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/postgresql/sqlite3/oracle/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
|
80
|
+
|
81
|
+
# Default: sqlite3
|
82
|
+
|
83
|
+
[--skip-gemfile], [--no-skip-gemfile] # Don't create a Gemfile
|
84
|
+
|
85
|
+
-G, [--skip-git], [--no-skip-git] # Skip .gitignore file
|
86
|
+
|
87
|
+
[--skip-keeps], [--no-skip-keeps] # Skip source control .keep files
|
88
|
+
|
89
|
+
-M, [--skip-action-mailer], [--no-skip-action-mailer] # Skip Action Mailer files
|
90
|
+
|
91
|
+
[--skip-action-mailbox], [--no-skip-action-mailbox] # Skip Action Mailbox gem
|
92
|
+
|
93
|
+
[--skip-action-text], [--no-skip-action-text] # Skip Action Text gem
|
94
|
+
|
95
|
+
-O, [--skip-active-record], [--no-skip-active-record] # Skip Active Record files
|
96
|
+
|
97
|
+
[--skip-active-storage], [--no-skip-active-storage] # Skip Active Storage files
|
98
|
+
|
99
|
+
-P, [--skip-puma], [--no-skip-puma] # Skip Puma related files
|
100
|
+
|
101
|
+
-C, [--skip-action-cable], [--no-skip-action-cable] # Skip Action Cable files
|
102
|
+
|
103
|
+
-S, [--skip-sprockets], [--no-skip-sprockets] # Skip Sprockets files
|
104
|
+
|
105
|
+
[--skip-spring], [--no-skip-spring] # Don't install Spring application preloader
|
106
|
+
|
107
|
+
[--skip-listen], [--no-skip-listen] # Don't generate configuration that depends on the listen gem
|
108
|
+
|
109
|
+
-J, [--skip-javascript], [--no-skip-javascript] # Skip JavaScript files
|
110
|
+
|
111
|
+
[--skip-turbolinks], [--no-skip-turbolinks] # Skip turbolinks gem
|
112
|
+
|
113
|
+
-T, [--skip-test], [--no-skip-test] # Skip test files
|
114
|
+
|
115
|
+
[--skip-system-test], [--no-skip-system-test] # Skip system test files
|
116
|
+
|
117
|
+
[--skip-bootsnap], [--no-skip-bootsnap] # Skip bootsnap gem
|
118
|
+
|
119
|
+
[--dev], [--no-dev] # Setup the application with Gemfile pointing to your Rails checkout
|
120
|
+
|
121
|
+
[--edge], [--no-edge] # Setup the application with Gemfile pointing to Rails repository
|
122
|
+
|
123
|
+
[--rc=RC] # Path to file containing extra configuration options for rails command
|
124
|
+
|
125
|
+
[--no-rc], [--no-no-rc] # Skip loading of extra configuration options from .railsrc file
|
126
|
+
|
127
|
+
[--api], [--no-api] # Preconfigure smaller stack for API only apps
|
128
|
+
|
129
|
+
-B, [--skip-bundle], [--no-skip-bundle] # Don't run bundle install
|
130
|
+
|
131
|
+
--webpacker, [--webpack=WEBPACK] # Preconfigure Webpack with a particular framework (options: react, vue, angular, elm, stimulus)
|
132
|
+
|
133
|
+
[--skip-webpack-install], [--no-skip-webpack-install] # Don't run Webpack install
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
Runtime options:
|
138
|
+
|
139
|
+
-f, [--force] # Overwrite files that already exist
|
140
|
+
|
141
|
+
-p, [--pretend], [--no-pretend] # Run but do not make any changes
|
142
|
+
|
143
|
+
-q, [--quiet], [--no-quiet] # Suppress status output
|
144
|
+
|
145
|
+
-s, [--skip], [--no-skip] # Skip files that already exist
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
Rails options:
|
150
|
+
|
151
|
+
-h, [--help], [--no-help] # Show this help message and quit
|
152
|
+
|
153
|
+
-v, [--version], [--no-version] # Show Rails version number and quit
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
Description:
|
158
|
+
|
159
|
+
The 'rails new' command creates a new Rails application with a default
|
160
|
+
|
161
|
+
directory structure and configuration at the path you specify.
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
You can specify extra command-line arguments to be used every time
|
166
|
+
|
167
|
+
'rails new' runs in the .railsrc configuration file in your home directory.
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
Note that the arguments specified in the .railsrc file don't affect the
|
172
|
+
|
173
|
+
defaults values shown above in this help message.
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
Example:
|
178
|
+
|
179
|
+
rails new ~/Code/Ruby/weblog
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
|
184
|
+
|
185
|
+
```
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
### 発生している問題・エラーメッセージ
|
192
|
+
|
193
|
+
コード
|
194
|
+
|
195
|
+
```
|
196
|
+
|
197
|
+
$ rails s
|
198
|
+
|
199
|
+
```
|
200
|
+
|
201
|
+
エラーメッセージ
|
202
|
+
|
203
|
+
```
|
204
|
+
|
205
|
+
Traceback (most recent call last):
|
206
|
+
|
207
|
+
1: from bin/rails:3:in `<main>'
|
208
|
+
|
209
|
+
bin/rails:3:in `require_relative': cannot load such file -- /Users/xxx/xxxx/config/boot (LoadError)
|
210
|
+
|
211
|
+
```
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
### 試したこと
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
・各種ツールのアップデート
|
222
|
+
|
223
|
+
・再インストール
|
224
|
+
|
225
|
+
・アプリの再作成(rails new)
|
226
|
+
|
33
227
|
<追記>
|
34
228
|
|
35
|
-
→rubyのバージョンを2.5.0→2.7.1に更新、rails newしたところboot.rbは作成されました。
|
36
|
-
|
37
|
-
しかし、下記のようにbootsnap/setupがないとエラーが発生しました。
|
38
|
-
|
39
|
-
```
|
40
|
-
|
41
|
-
/Users/taka/workspace/TF_MAP/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError)
|
42
|
-
|
43
|
-
```
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
### 発生している問題・エラーメッセージ
|
48
|
-
|
49
|
-
コード
|
50
|
-
|
51
|
-
```
|
52
|
-
|
53
|
-
$ rails s
|
54
|
-
|
55
|
-
```
|
56
|
-
|
57
|
-
エラーメッセージ
|
58
|
-
|
59
|
-
```
|
60
|
-
|
61
|
-
Traceback (most recent call last):
|
62
|
-
|
63
|
-
1: from bin/rails:3:in `<main>'
|
64
|
-
|
65
|
-
bin/rails:3:in `require_relative': cannot load such file -- /Users/xxx/xxxx/config/boot (LoadError)
|
66
|
-
|
67
|
-
```
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
### 試したこと
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
・各種ツールのアップデート
|
78
|
-
|
79
|
-
・再インストール
|
80
|
-
|
81
|
-
・アプリの再作成(rails new)
|
82
|
-
|
83
|
-
<追記>
|
84
|
-
|
85
229
|
・rubyのバージョンを2.5.0→2.7.1に更新
|
86
230
|
|
87
231
|
→boot.rbの作成はなされた
|
2
rubyバージョンアップしたことによる変化点を記載
test
CHANGED
File without changes
|
test
CHANGED
@@ -26,7 +26,21 @@
|
|
26
26
|
|
27
27
|
下記のコード実行後のエラーの通りか確認したところ、確かに対象の場所に”boot”というファイルがありませんでした。
|
28
28
|
|
29
|
-
何が誤っているのか、どうすればraisが起動できるのか分からず、ご教示のほどよろしくお願いします。
|
29
|
+
何が誤っているのか、どうすればrailsが起動できるのか分からず、ご教示のほどよろしくお願いします。
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
<追記>
|
34
|
+
|
35
|
+
→rubyのバージョンを2.5.0→2.7.1に更新、rails newしたところboot.rbは作成されました。
|
36
|
+
|
37
|
+
しかし、下記のようにbootsnap/setupがないとエラーが発生しました。
|
38
|
+
|
39
|
+
```
|
40
|
+
|
41
|
+
/Users/taka/workspace/TF_MAP/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError)
|
42
|
+
|
43
|
+
```
|
30
44
|
|
31
45
|
|
32
46
|
|
@@ -66,6 +80,12 @@
|
|
66
80
|
|
67
81
|
・アプリの再作成(rails new)
|
68
82
|
|
83
|
+
<追記>
|
84
|
+
|
85
|
+
・rubyのバージョンを2.5.0→2.7.1に更新
|
86
|
+
|
87
|
+
→boot.rbの作成はなされた
|
88
|
+
|
69
89
|
|
70
90
|
|
71
91
|
### 補足情報(FW/ツールのバージョンなど)
|
@@ -74,6 +94,8 @@
|
|
74
94
|
|
75
95
|
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin19]
|
76
96
|
|
97
|
+
→ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin19]
|
98
|
+
|
77
99
|
Rails 6.0.2.2
|
78
100
|
|
79
101
|
データベースはMySQLです
|
1
誤字・脱字の訂正
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
+
### 前提・実現したいこと
|
2
|
+
|
1
3
|
こちらの方の記事を参考にさせて頂き、rails環境構築をしようとしています。
|
2
4
|
|
3
5
|
[リンク内容:qiita記事 Ruby初学者のRuby On Rails 環境構築【Mac】](https://qiita.com/TAByasu/items/47c6cfbeeafad39eda07#%E5%8F%82%E8%80%83%E3%81%BE%E3%81%A7%E3%81%AB%E3%83%9E%E3%82%B7%E3%83%B3%E3%82%B9%E3%83%9A%E3%83%83%E3%82%AF)
|
4
6
|
|
5
7
|
|
6
8
|
|
7
|
-
最後のrailsサーバー起動した後に、http://localhost:3000/へブラウザアクセスしても
|
9
|
+
最後のrailsサーバーを起動した後に、http://localhost:3000/へブラウザアクセスしても
|
8
10
|
|
9
11
|
下記のように表示され、起動しませんでした。
|
10
12
|
|
@@ -24,7 +26,7 @@
|
|
24
26
|
|
25
27
|
下記のコード実行後のエラーの通りか確認したところ、確かに対象の場所に”boot”というファイルがありませんでした。
|
26
28
|
|
27
|
-
何が誤っているのか、どうすればrais
|
29
|
+
何が誤っているのか、どうすればraisが起動できるのか分からず、ご教示のほどよろしくお願いします。
|
28
30
|
|
29
31
|
|
30
32
|
|