teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

9

追記

2017/03/30 12:11

投稿

haskins2341
haskins2341

スコア14

title CHANGED
File without changes
body CHANGED
@@ -18,15 +18,13 @@
18
18
  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
19
19
  machine.
20
20
 
21
- [!] There was an error parsing `Gemfile`: undefined method `[]' for nil:NilClass. Bundler cannot continue.
21
+ [!] There was an error parsing `Gemfile`: (<unknown>): could not find expected ':' while scanning a simple key at line 26 column 1. Bundler cannot continue.
22
22
 
23
- [!] There was an error parsing `Gemfile`: undefined method `[]' for nil:NilClass. Bundler cannot continue.
24
-
25
- # from /opt/redmine-3.2.0/Gemfile:58
23
+ # from /opt/redmine-3.2.0/Gemfile:57
26
24
  # -------------------------------------------
25
+ # if File.exist?(database_file)
27
- # database_config = YAML::load(ERB.new(IO.read(database_file)).result)
26
+ > database_config = YAML::load(ERB.new(IO.read(database_file)).result)
28
- > adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
27
+ # adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
29
- # if adapters.any?
30
28
  # -------------------------------------------
31
29
  ```
32
30
 

8

編集

2017/03/30 12:11

投稿

haskins2341
haskins2341

スコア14

title CHANGED
File without changes
body CHANGED
@@ -39,7 +39,7 @@
39
39
 
40
40
 
41
41
 
42
- ```
42
+ ```config/database.yml
43
43
  # Default setup is given for MySQL with ruby1.9.
44
44
  # Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
45
45
  # Line indentation must be 2 spaces (no tabs).
@@ -78,4 +78,121 @@
78
78
  # host: localhost
79
79
  # username: jenkins
80
80
  # password: jenkins
81
+ ```
82
+
83
+
84
+
85
+
86
+ ```Gemfile
87
+ 1 source 'https://rubygems.org'
88
+ 2
89
+ 3 if Gem::Version.new(Bundler::VERSION) < Gem::Version.new('1.5.0')
90
+ 4 abort "Redmine requires Bundler 1.5.0 or higher (you're using #{Bundler::VERSION}).\nPlease update with 'gem update bundler'."
91
+ 5 end
92
+ 6
93
+ 7 gem "rails", "4.2.5"
94
+ 8 gem "jquery-rails", "~> 3.1.4"
95
+ 9 gem "coderay", "~> 1.1.0"
96
+ 10 gem "builder", ">= 3.0.4"
97
+ 11 gem "request_store", "1.0.5"
98
+ 12 gem "mime-types"
99
+ 13 gem "protected_attributes"
100
+ 14 gem "actionpack-action_caching"
101
+ 15 gem "actionpack-xml_parser"
102
+ 16 gem "roadie-rails"
103
+ 17
104
+ 18 # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
105
+ 19 gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin, :jruby]
106
+ 20 gem "rbpdf", "~> 1.19.0"
107
+ 21
108
+ 22 # Optional gem for LDAP authentication
109
+ 23 group :ldap do
110
+ 24 gem "net-ldap", "~> 0.12.0"
111
+ 25 end
112
+ 26
113
+ 27 # Optional gem for OpenID authentication
114
+ 28 group :openid do
115
+ 29 gem "ruby-openid", "~> 2.3.0", :require => "openid"
116
+ 30 gem "rack-openid"
117
+ 31 end
118
+ 32
119
+ 33 platforms :mri, :mingw, :x64_mingw do
120
+ 34 # Optional gem for exporting the gantt to a PNG file, not supported with jruby
121
+ 35 group :rmagick do
122
+ 36 gem "rmagick", ">= 2.14.0"
123
+ 37 end
124
+ 38
125
+ 39 # Optional Markdown support, not for JRuby
126
+ 40 group :markdown do
127
+ 41 gem "redcarpet", "~> 3.3.2"
128
+ 42 end
129
+ 43 end
130
+ 44
131
+ 45 platforms :jruby do
132
+ 46 # jruby-openssl is bundled with JRuby 1.7.0
133
+ 47 gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0'
134
+ 48 gem "activerecord-jdbc-adapter", "~> 1.3.2"
135
+ 49 end
136
+ 50
137
+ 51 # Include database gems for the adapters found in the database
138
+ 52 # configuration file
139
+ 53 require 'erb'
140
+ 54 require 'yaml'
141
+ 55 database_file = File.join(File.dirname(__FILE__), "config/database.yml")
142
+ 56 if File.exist?(database_file)
143
+ 57 database_config = YAML::load(ERB.new(IO.read(database_file)).result)
144
+ 58 adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
145
+ 59 if adapters.any?
146
+ 60 adapters.each do |adapter|
147
+ 61 case adapter
148
+ 62 when 'mysql2'
149
+ 63 gem "mysql2", "~> 0.3.11", :platforms => [:mri, :mingw, :x64_mingw]
150
+ 64 gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
151
+ 65 when 'mysql'
152
+ 66 gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
153
+ 67 when /postgresql/
154
+ 68 gem "pg", "~> 0.18.1", :platforms => [:mri, :mingw, :x64_mingw]
155
+ 69 gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby
156
+ 70 when /sqlite3/
157
+ 71 gem "sqlite3", :platforms => [:mri, :mingw, :x64_mingw]
158
+ 72 gem "jdbc-sqlite3", ">= 3.8.10.1", :platforms => :jruby
159
+ 73 gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
160
+ 74 when /sqlserver/
161
+ 75 gem "tiny_tds", "~> 0.6.2", :platforms => [:mri, :mingw, :x64_mingw]
162
+ 76 gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw, :x64_mingw]
163
+ 77 else
164
+ 78 warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
165
+ 79 end
166
+ 80 end
167
+ 81 else
168
+ 82 warn("No adapter found in config/database.yml, please configure it first")
169
+ 83 end
170
+ 84 else
171
+ 85 warn("Please configure your config/database.yml first")
172
+ 86 end
173
+ 87
174
+ 88 group :development do
175
+ 89 gem "rdoc", ">= 2.4.2"
176
+ 90 gem "yard"
177
+ 91 end
178
+ 92
179
+ 93 group :test do
180
+ 94 gem "minitest"
181
+ 95 gem "rails-dom-testing"
182
+ 96 gem "mocha"
183
+ 97 gem "simplecov", "~> 0.9.1", :require => false
184
+ 98 # For running UI tests
185
+ 99 gem "capybara"
186
+ 100 gem "selenium-webdriver"
187
+ 101 end
188
+ 102
189
+ 103 local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
190
+ 104 if File.exists?(local_gemfile)
191
+ 105 eval_gemfile local_gemfile
192
+ 106 end
193
+ 107
194
+ 108 # Load plugins' Gemfiles
195
+ 109 Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file|
196
+ 110 eval_gemfile file
197
+ 111 end
81
198
  ```

7

追記

2017/03/30 12:10

投稿

haskins2341
haskins2341

スコア14

title CHANGED
File without changes
body CHANGED
@@ -76,4 +76,6 @@
76
76
  # adapter: sqlserver
77
77
  # database: redmine
78
78
  # host: localhost
79
+ # username: jenkins
80
+ # password: jenkins
79
81
  ```

6

編集

2017/03/30 12:06

投稿

haskins2341
haskins2341

スコア14

title CHANGED
File without changes
body CHANGED
@@ -14,6 +14,7 @@
14
14
  bundle install --without development test
15
15
  このコマンドを実行すると下のエラーが出ます
16
16
 
17
+ ```
17
18
  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
18
19
  machine.
19
20
 
@@ -27,6 +28,7 @@
27
28
  > adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
28
29
  # if adapters.any?
29
30
  # -------------------------------------------
31
+ ```
30
32
 
31
33
  よくわからず正直結構お手上げです、、、、
32
34
  Redmineインストール時に作成されるファイル「Gemfile」がどうたらといわれている気がするのですが、どうしたらいいでしょうか?

5

追記

2017/03/30 12:05

投稿

haskins2341
haskins2341

スコア14

title CHANGED
File without changes
body CHANGED
@@ -33,7 +33,45 @@
33
33
 
34
34
 
35
35
 
36
+
37
+
38
+
39
+
36
40
  ```
37
41
  # Default setup is given for MySQL with ruby1.9.
38
42
  # Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
43
+ # Line indentation must be 2 spaces (no tabs).
44
+
45
+
46
+ # Warning: The database defined as "test" will be erased and
47
+ # re-generated from your development database when you run "rake".
48
+ # Do not set this db to the same as development or production.
49
+ test:
50
+ production:
51
+ adapter: mysql
52
+ database: redmine
53
+ host: localhost
54
+ username: redmine
55
+ password: my_password
56
+
57
+
58
+ # PostgreSQL configuration example
59
+ production:
60
+ adapter: postgresql
61
+ database: redmine
62
+ host: localhost
63
+ username: postgres
64
+ password: "postgres"
65
+ encoding: utf8
66
+ adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
67
+ # SQLite3 configuration example
68
+ #production:
69
+ # adapter: sqlite3
70
+ # database: db/redmine.sqlite3
71
+
72
+ # SQL Server configuration example
73
+ #production:
74
+ # adapter: sqlserver
75
+ # database: redmine
76
+ # host: localhost
39
77
  ```

4

追記

2017/03/30 12:05

投稿

haskins2341
haskins2341

スコア14

title CHANGED
File without changes
body CHANGED
@@ -33,41 +33,7 @@
33
33
 
34
34
 
35
35
 
36
+ ```
36
37
  # Default setup is given for MySQL with ruby1.9.
37
38
  # Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
38
- # Line indentation must be 2 spaces (no tabs).
39
-
40
-
41
- # Warning: The database defined as "test" will be erased and
42
- # re-generated from your development database when you run "rake".
43
- # Do not set this db to the same as development or production.
44
- test:
39
+ ```
45
- production:
46
- adapter: mysql
47
- database: redmine
48
- host: localhost
49
- username: redmine
50
- password: my_password
51
-
52
-
53
- # PostgreSQL configuration example
54
- production:
55
- adapter: postgresql
56
- database: redmine
57
- host: localhost
58
- username: postgres
59
- password: "postgres"
60
- encoding: utf8
61
- adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
62
- # SQLite3 configuration example
63
- #production:
64
- # adapter: sqlite3
65
- # database: db/redmine.sqlite3
66
-
67
- # SQL Server configuration example
68
- #production:
69
- # adapter: sqlserver
70
- # database: redmine
71
- # host: localhost
72
- # username: jenkins
73
- # password: jenkins

3

追記

2017/03/30 12:03

投稿

haskins2341
haskins2341

スコア14

title CHANGED
File without changes
body CHANGED
@@ -29,4 +29,45 @@
29
29
  # -------------------------------------------
30
30
 
31
31
  よくわからず正直結構お手上げです、、、、
32
- Redmineインストール時に作成されるファイル「Gemfile」がどうたらといわれている気がするのですが、どうしたらいいでしょうか?
32
+ Redmineインストール時に作成されるファイル「Gemfile」がどうたらといわれている気がするのですが、どうしたらいいでしょうか?
33
+
34
+
35
+
36
+ # Default setup is given for MySQL with ruby1.9.
37
+ # Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
38
+ # Line indentation must be 2 spaces (no tabs).
39
+
40
+
41
+ # Warning: The database defined as "test" will be erased and
42
+ # re-generated from your development database when you run "rake".
43
+ # Do not set this db to the same as development or production.
44
+ test:
45
+ production:
46
+ adapter: mysql
47
+ database: redmine
48
+ host: localhost
49
+ username: redmine
50
+ password: my_password
51
+
52
+
53
+ # PostgreSQL configuration example
54
+ production:
55
+ adapter: postgresql
56
+ database: redmine
57
+ host: localhost
58
+ username: postgres
59
+ password: "postgres"
60
+ encoding: utf8
61
+ adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
62
+ # SQLite3 configuration example
63
+ #production:
64
+ # adapter: sqlite3
65
+ # database: db/redmine.sqlite3
66
+
67
+ # SQL Server configuration example
68
+ #production:
69
+ # adapter: sqlserver
70
+ # database: redmine
71
+ # host: localhost
72
+ # username: jenkins
73
+ # password: jenkins

2

誤字

2017/03/30 12:02

投稿

haskins2341
haskins2341

スコア14

title CHANGED
File without changes
body CHANGED
@@ -19,6 +19,8 @@
19
19
 
20
20
  [!] There was an error parsing `Gemfile`: undefined method `[]' for nil:NilClass. Bundler cannot continue.
21
21
 
22
+ [!] There was an error parsing `Gemfile`: undefined method `[]' for nil:NilClass. Bundler cannot continue.
23
+
22
24
  # from /opt/redmine-3.2.0/Gemfile:58
23
25
  # -------------------------------------------
24
26
  # database_config = YAML::load(ERB.new(IO.read(database_file)).result)

1

誤字

2017/03/30 11:35

投稿

haskins2341
haskins2341

スコア14

title CHANGED
File without changes
body CHANGED
@@ -16,11 +16,15 @@
16
16
 
17
17
  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
18
18
  machine.
19
+
19
20
  [!] There was an error parsing `Gemfile`: undefined method `[]' for nil:NilClass. Bundler cannot continue.
21
+
20
22
  # from /opt/redmine-3.2.0/Gemfile:58
23
+ # -------------------------------------------
21
24
  # database_config = YAML::load(ERB.new(IO.read(database_file)).result)
22
25
  > adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
23
26
  # if adapters.any?
27
+ # -------------------------------------------
24
28
 
25
29
  よくわからず正直結構お手上げです、、、、
26
30
  Redmineインストール時に作成されるファイル「Gemfile」がどうたらといわれている気がするのですが、どうしたらいいでしょうか?