質問編集履歴

9

追記

2017/03/30 12:11

投稿

haskins2341
haskins2341

スコア14

test CHANGED
File without changes
test CHANGED
@@ -38,23 +38,19 @@
38
38
 
39
39
 
40
40
 
41
- [!] There was an error parsing `Gemfile`: undefined method `[]' for nil:NilClass. Bundler cannot continue.
41
+ [!] There was an error parsing `Gemfile`: (<unknown>): could not find expected ':' while scanning a simple key at line 26 column 1. Bundler cannot continue.
42
-
43
-
44
-
45
- [!] There was an error parsing `Gemfile`: undefined method `[]' for nil:NilClass. Bundler cannot continue.
42
+
46
-
47
-
48
-
43
+
44
+
49
- # from /opt/redmine-3.2.0/Gemfile:58
45
+ # from /opt/redmine-3.2.0/Gemfile:57
50
46
 
51
47
  # -------------------------------------------
52
48
 
49
+ # if File.exist?(database_file)
50
+
53
- # database_config = YAML::load(ERB.new(IO.read(database_file)).result)
51
+ > database_config = YAML::load(ERB.new(IO.read(database_file)).result)
54
-
52
+
55
- > adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
53
+ # adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
56
-
57
- # if adapters.any?
58
54
 
59
55
  # -------------------------------------------
60
56
 

8

編集

2017/03/30 12:11

投稿

haskins2341
haskins2341

スコア14

test CHANGED
File without changes
test CHANGED
@@ -80,82 +80,316 @@
80
80
 
81
81
 
82
82
 
83
+ ```config/database.yml
84
+
85
+ # Default setup is given for MySQL with ruby1.9.
86
+
87
+ # Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
88
+
89
+ # Line indentation must be 2 spaces (no tabs).
90
+
91
+
92
+
93
+
94
+
95
+ # Warning: The database defined as "test" will be erased and
96
+
97
+ # re-generated from your development database when you run "rake".
98
+
99
+ # Do not set this db to the same as development or production.
100
+
101
+ test:
102
+
103
+ production:
104
+
105
+ adapter: mysql
106
+
107
+ database: redmine
108
+
109
+ host: localhost
110
+
111
+ username: redmine
112
+
113
+ password: my_password
114
+
115
+
116
+
117
+
118
+
119
+ # PostgreSQL configuration example
120
+
121
+ production:
122
+
123
+ adapter: postgresql
124
+
125
+ database: redmine
126
+
127
+ host: localhost
128
+
129
+ username: postgres
130
+
131
+ password: "postgres"
132
+
133
+ encoding: utf8
134
+
135
+ adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
136
+
137
+ # SQLite3 configuration example
138
+
139
+ #production:
140
+
141
+ # adapter: sqlite3
142
+
143
+ # database: db/redmine.sqlite3
144
+
145
+
146
+
147
+ # SQL Server configuration example
148
+
149
+ #production:
150
+
151
+ # adapter: sqlserver
152
+
153
+ # database: redmine
154
+
155
+ # host: localhost
156
+
157
+ # username: jenkins
158
+
159
+ # password: jenkins
160
+
83
161
  ```
84
162
 
85
- # Default setup is given for MySQL with ruby1.9.
86
-
87
- # Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
88
-
89
- # Line indentation must be 2 spaces (no tabs).
90
-
91
-
92
-
93
-
94
-
95
- # Warning: The database defined as "test" will be erased and
96
-
97
- # re-generated from your development database when you run "rake".
98
-
99
- # Do not set this db to the same as development or production.
100
-
101
- test:
102
-
103
- production:
104
-
105
- adapter: mysql
106
-
107
- database: redmine
108
-
109
- host: localhost
110
-
111
- username: redmine
112
-
113
- password: my_password
114
-
115
-
116
-
117
-
118
-
119
- # PostgreSQL configuration example
120
-
121
- production:
122
-
123
- adapter: postgresql
124
-
125
- database: redmine
126
-
127
- host: localhost
128
-
129
- username: postgres
130
-
131
- password: "postgres"
132
-
133
- encoding: utf8
134
-
135
- adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
136
-
137
- # SQLite3 configuration example
138
-
139
- #production:
140
-
141
- # adapter: sqlite3
142
-
143
- # database: db/redmine.sqlite3
144
-
145
-
146
-
147
- # SQL Server configuration example
148
-
149
- #production:
150
-
151
- # adapter: sqlserver
152
-
153
- # database: redmine
154
-
155
- # host: localhost
156
-
157
- # username: jenkins
158
-
159
- # password: jenkins
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ ```Gemfile
172
+
173
+ 1 source 'https://rubygems.org'
174
+
175
+ 2
176
+
177
+ 3 if Gem::Version.new(Bundler::VERSION) < Gem::Version.new('1.5.0')
178
+
179
+ 4 abort "Redmine requires Bundler 1.5.0 or higher (you're using #{Bundler::VERSION}).\nPlease update with 'gem update bundler'."
180
+
181
+ 5 end
182
+
183
+ 6
184
+
185
+ 7 gem "rails", "4.2.5"
186
+
187
+ 8 gem "jquery-rails", "~> 3.1.4"
188
+
189
+ 9 gem "coderay", "~> 1.1.0"
190
+
191
+ 10 gem "builder", ">= 3.0.4"
192
+
193
+ 11 gem "request_store", "1.0.5"
194
+
195
+ 12 gem "mime-types"
196
+
197
+ 13 gem "protected_attributes"
198
+
199
+ 14 gem "actionpack-action_caching"
200
+
201
+ 15 gem "actionpack-xml_parser"
202
+
203
+ 16 gem "roadie-rails"
204
+
205
+ 17
206
+
207
+ 18 # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
208
+
209
+ 19 gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin, :jruby]
210
+
211
+ 20 gem "rbpdf", "~> 1.19.0"
212
+
213
+ 21
214
+
215
+ 22 # Optional gem for LDAP authentication
216
+
217
+ 23 group :ldap do
218
+
219
+ 24 gem "net-ldap", "~> 0.12.0"
220
+
221
+ 25 end
222
+
223
+ 26
224
+
225
+ 27 # Optional gem for OpenID authentication
226
+
227
+ 28 group :openid do
228
+
229
+ 29 gem "ruby-openid", "~> 2.3.0", :require => "openid"
230
+
231
+ 30 gem "rack-openid"
232
+
233
+ 31 end
234
+
235
+ 32
236
+
237
+ 33 platforms :mri, :mingw, :x64_mingw do
238
+
239
+ 34 # Optional gem for exporting the gantt to a PNG file, not supported with jruby
240
+
241
+ 35 group :rmagick do
242
+
243
+ 36 gem "rmagick", ">= 2.14.0"
244
+
245
+ 37 end
246
+
247
+ 38
248
+
249
+ 39 # Optional Markdown support, not for JRuby
250
+
251
+ 40 group :markdown do
252
+
253
+ 41 gem "redcarpet", "~> 3.3.2"
254
+
255
+ 42 end
256
+
257
+ 43 end
258
+
259
+ 44
260
+
261
+ 45 platforms :jruby do
262
+
263
+ 46 # jruby-openssl is bundled with JRuby 1.7.0
264
+
265
+ 47 gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0'
266
+
267
+ 48 gem "activerecord-jdbc-adapter", "~> 1.3.2"
268
+
269
+ 49 end
270
+
271
+ 50
272
+
273
+ 51 # Include database gems for the adapters found in the database
274
+
275
+ 52 # configuration file
276
+
277
+ 53 require 'erb'
278
+
279
+ 54 require 'yaml'
280
+
281
+ 55 database_file = File.join(File.dirname(__FILE__), "config/database.yml")
282
+
283
+ 56 if File.exist?(database_file)
284
+
285
+ 57 database_config = YAML::load(ERB.new(IO.read(database_file)).result)
286
+
287
+ 58 adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
288
+
289
+ 59 if adapters.any?
290
+
291
+ 60 adapters.each do |adapter|
292
+
293
+ 61 case adapter
294
+
295
+ 62 when 'mysql2'
296
+
297
+ 63 gem "mysql2", "~> 0.3.11", :platforms => [:mri, :mingw, :x64_mingw]
298
+
299
+ 64 gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
300
+
301
+ 65 when 'mysql'
302
+
303
+ 66 gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
304
+
305
+ 67 when /postgresql/
306
+
307
+ 68 gem "pg", "~> 0.18.1", :platforms => [:mri, :mingw, :x64_mingw]
308
+
309
+ 69 gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby
310
+
311
+ 70 when /sqlite3/
312
+
313
+ 71 gem "sqlite3", :platforms => [:mri, :mingw, :x64_mingw]
314
+
315
+ 72 gem "jdbc-sqlite3", ">= 3.8.10.1", :platforms => :jruby
316
+
317
+ 73 gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
318
+
319
+ 74 when /sqlserver/
320
+
321
+ 75 gem "tiny_tds", "~> 0.6.2", :platforms => [:mri, :mingw, :x64_mingw]
322
+
323
+ 76 gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw, :x64_mingw]
324
+
325
+ 77 else
326
+
327
+ 78 warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
328
+
329
+ 79 end
330
+
331
+ 80 end
332
+
333
+ 81 else
334
+
335
+ 82 warn("No adapter found in config/database.yml, please configure it first")
336
+
337
+ 83 end
338
+
339
+ 84 else
340
+
341
+ 85 warn("Please configure your config/database.yml first")
342
+
343
+ 86 end
344
+
345
+ 87
346
+
347
+ 88 group :development do
348
+
349
+ 89 gem "rdoc", ">= 2.4.2"
350
+
351
+ 90 gem "yard"
352
+
353
+ 91 end
354
+
355
+ 92
356
+
357
+ 93 group :test do
358
+
359
+ 94 gem "minitest"
360
+
361
+ 95 gem "rails-dom-testing"
362
+
363
+ 96 gem "mocha"
364
+
365
+ 97 gem "simplecov", "~> 0.9.1", :require => false
366
+
367
+ 98 # For running UI tests
368
+
369
+ 99 gem "capybara"
370
+
371
+ 100 gem "selenium-webdriver"
372
+
373
+ 101 end
374
+
375
+ 102
376
+
377
+ 103 local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
378
+
379
+ 104 if File.exists?(local_gemfile)
380
+
381
+ 105 eval_gemfile local_gemfile
382
+
383
+ 106 end
384
+
385
+ 107
386
+
387
+ 108 # Load plugins' Gemfiles
388
+
389
+ 109 Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file|
390
+
391
+ 110 eval_gemfile file
392
+
393
+ 111 end
160
394
 
161
395
  ```

7

追記

2017/03/30 12:10

投稿

haskins2341
haskins2341

スコア14

test CHANGED
File without changes
test CHANGED
@@ -154,4 +154,8 @@
154
154
 
155
155
  # host: localhost
156
156
 
157
+ # username: jenkins
158
+
159
+ # password: jenkins
160
+
157
161
  ```

6

編集

2017/03/30 12:06

投稿

haskins2341
haskins2341

スコア14

test CHANGED
File without changes
test CHANGED
@@ -30,6 +30,8 @@
30
30
 
31
31
 
32
32
 
33
+ ```
34
+
33
35
  Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this
34
36
 
35
37
  machine.
@@ -55,6 +57,8 @@
55
57
  # if adapters.any?
56
58
 
57
59
  # -------------------------------------------
60
+
61
+ ```
58
62
 
59
63
 
60
64
 

5

追記

2017/03/30 12:05

投稿

haskins2341
haskins2341

スコア14

test CHANGED
File without changes
test CHANGED
@@ -68,10 +68,86 @@
68
68
 
69
69
 
70
70
 
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
71
79
  ```
72
80
 
73
81
  # Default setup is given for MySQL with ruby1.9.
74
82
 
75
83
  # Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
76
84
 
85
+ # Line indentation must be 2 spaces (no tabs).
86
+
87
+
88
+
89
+
90
+
91
+ # Warning: The database defined as "test" will be erased and
92
+
93
+ # re-generated from your development database when you run "rake".
94
+
95
+ # Do not set this db to the same as development or production.
96
+
97
+ test:
98
+
99
+ production:
100
+
101
+ adapter: mysql
102
+
103
+ database: redmine
104
+
105
+ host: localhost
106
+
107
+ username: redmine
108
+
109
+ password: my_password
110
+
111
+
112
+
113
+
114
+
115
+ # PostgreSQL configuration example
116
+
117
+ production:
118
+
119
+ adapter: postgresql
120
+
121
+ database: redmine
122
+
123
+ host: localhost
124
+
125
+ username: postgres
126
+
127
+ password: "postgres"
128
+
129
+ encoding: utf8
130
+
131
+ adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
132
+
133
+ # SQLite3 configuration example
134
+
135
+ #production:
136
+
137
+ # adapter: sqlite3
138
+
139
+ # database: db/redmine.sqlite3
140
+
141
+
142
+
143
+ # SQL Server configuration example
144
+
145
+ #production:
146
+
147
+ # adapter: sqlserver
148
+
149
+ # database: redmine
150
+
151
+ # host: localhost
152
+
77
153
  ```

4

追記

2017/03/30 12:05

投稿

haskins2341
haskins2341

スコア14

test CHANGED
File without changes
test CHANGED
@@ -68,78 +68,10 @@
68
68
 
69
69
 
70
70
 
71
+ ```
72
+
71
73
  # Default setup is given for MySQL with ruby1.9.
72
74
 
73
75
  # Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
74
76
 
75
- # Line indentation must be 2 spaces (no tabs).
76
-
77
-
78
-
79
-
80
-
81
- # Warning: The database defined as "test" will be erased and
82
-
83
- # re-generated from your development database when you run "rake".
84
-
85
- # Do not set this db to the same as development or production.
86
-
87
- test:
77
+ ```
88
-
89
- production:
90
-
91
- adapter: mysql
92
-
93
- database: redmine
94
-
95
- host: localhost
96
-
97
- username: redmine
98
-
99
- password: my_password
100
-
101
-
102
-
103
-
104
-
105
- # PostgreSQL configuration example
106
-
107
- production:
108
-
109
- adapter: postgresql
110
-
111
- database: redmine
112
-
113
- host: localhost
114
-
115
- username: postgres
116
-
117
- password: "postgres"
118
-
119
- encoding: utf8
120
-
121
- adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
122
-
123
- # SQLite3 configuration example
124
-
125
- #production:
126
-
127
- # adapter: sqlite3
128
-
129
- # database: db/redmine.sqlite3
130
-
131
-
132
-
133
- # SQL Server configuration example
134
-
135
- #production:
136
-
137
- # adapter: sqlserver
138
-
139
- # database: redmine
140
-
141
- # host: localhost
142
-
143
- # username: jenkins
144
-
145
- # password: jenkins

3

追記

2017/03/30 12:03

投稿

haskins2341
haskins2341

スコア14

test CHANGED
File without changes
test CHANGED
@@ -61,3 +61,85 @@
61
61
  よくわからず正直結構お手上げです、、、、
62
62
 
63
63
  Redmineインストール時に作成されるファイル「Gemfile」がどうたらといわれている気がするのですが、どうしたらいいでしょうか?
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+ # Default setup is given for MySQL with ruby1.9.
72
+
73
+ # Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
74
+
75
+ # Line indentation must be 2 spaces (no tabs).
76
+
77
+
78
+
79
+
80
+
81
+ # Warning: The database defined as "test" will be erased and
82
+
83
+ # re-generated from your development database when you run "rake".
84
+
85
+ # Do not set this db to the same as development or production.
86
+
87
+ test:
88
+
89
+ production:
90
+
91
+ adapter: mysql
92
+
93
+ database: redmine
94
+
95
+ host: localhost
96
+
97
+ username: redmine
98
+
99
+ password: my_password
100
+
101
+
102
+
103
+
104
+
105
+ # PostgreSQL configuration example
106
+
107
+ production:
108
+
109
+ adapter: postgresql
110
+
111
+ database: redmine
112
+
113
+ host: localhost
114
+
115
+ username: postgres
116
+
117
+ password: "postgres"
118
+
119
+ encoding: utf8
120
+
121
+ adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
122
+
123
+ # SQLite3 configuration example
124
+
125
+ #production:
126
+
127
+ # adapter: sqlite3
128
+
129
+ # database: db/redmine.sqlite3
130
+
131
+
132
+
133
+ # SQL Server configuration example
134
+
135
+ #production:
136
+
137
+ # adapter: sqlserver
138
+
139
+ # database: redmine
140
+
141
+ # host: localhost
142
+
143
+ # username: jenkins
144
+
145
+ # password: jenkins

2

誤字

2017/03/30 12:02

投稿

haskins2341
haskins2341

スコア14

test CHANGED
File without changes
test CHANGED
@@ -40,6 +40,10 @@
40
40
 
41
41
 
42
42
 
43
+ [!] There was an error parsing `Gemfile`: undefined method `[]' for nil:NilClass. Bundler cannot continue.
44
+
45
+
46
+
43
47
  # from /opt/redmine-3.2.0/Gemfile:58
44
48
 
45
49
  # -------------------------------------------

1

誤字

2017/03/30 11:35

投稿

haskins2341
haskins2341

スコア14

test CHANGED
File without changes
test CHANGED
@@ -34,9 +34,15 @@
34
34
 
35
35
  machine.
36
36
 
37
+
38
+
37
39
  [!] There was an error parsing `Gemfile`: undefined method `[]' for nil:NilClass. Bundler cannot continue.
38
40
 
41
+
42
+
39
43
  # from /opt/redmine-3.2.0/Gemfile:58
44
+
45
+ # -------------------------------------------
40
46
 
41
47
  # database_config = YAML::load(ERB.new(IO.read(database_file)).result)
42
48
 
@@ -44,6 +50,8 @@
44
50
 
45
51
  # if adapters.any?
46
52
 
53
+ # -------------------------------------------
54
+
47
55
 
48
56
 
49
57
  よくわからず正直結構お手上げです、、、、