質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Redmine

Redmineは、プロジェクトのタスク管理、進捗管理、情報共有が可能な、 オープンソースプロジェクト管理ソフトウェアです。

Q&A

2回答

7500閲覧

Redmineを会社で導入したのですがうまくいきません

haskins2341

総合スコア14

Redmine

Redmineは、プロジェクトのタスク管理、進捗管理、情報共有が可能な、 オープンソースプロジェクト管理ソフトウェアです。

0グッド

0クリップ

投稿2017/03/30 11:33

編集2017/03/30 12:11

会社でRedmineの導入をしてるのですがうまくいきません

以下の公式サイトの手順通りにやっております
http://redmine.jp/guide/RedmineInstall/
サイト内の下の過程まではで来たのですが


  1. 1.4.0以降では、Redmineはgemの依存関係を管理するために Bundler を使っています。まずはBundlerをインストールしてください:

gem install bundler

bundle install --without development test
このコマンドを実行すると下のエラーが出ます

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 machine. [!] There was an error parsing `Gemfile`: (<unknown>): could not find expected ':' while scanning a simple key at line 26 column 1. Bundler cannot continue. # from /opt/redmine-3.2.0/Gemfile:57 # ------------------------------------------- # if File.exist?(database_file) > database_config = YAML::load(ERB.new(IO.read(database_file)).result) # adapters = database_config.values.map {|c| c['adapter']}.compact.uniq # -------------------------------------------

よくわからず正直結構お手上げです、、、、
Redmineインストール時に作成されるファイル「Gemfile」がどうたらといわれている気がするのですが、どうしたらいいでしょうか?

config/database.yml

1# Default setup is given for MySQL with ruby1.9. 2# Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end. 3# Line indentation must be 2 spaces (no tabs). 4 5 6# Warning: The database defined as "test" will be erased and 7# re-generated from your development database when you run "rake". 8# Do not set this db to the same as development or production. 9test: 10production: 11 adapter: mysql 12 database: redmine 13 host: localhost 14 username: redmine 15 password: my_password 16 17 18# PostgreSQL configuration example 19production: 20 adapter: postgresql 21 database: redmine 22 host: localhost 23 username: postgres 24 password: "postgres" 25 encoding: utf8 26adapters = database_config.values.map {|c| c['adapter']}.compact.uniq 27# SQLite3 configuration example 28#production: 29# adapter: sqlite3 30# database: db/redmine.sqlite3 31 32# SQL Server configuration example 33#production: 34# adapter: sqlserver 35# database: redmine 36# host: localhost 37# username: jenkins 38# password: jenkins

Gemfile

1 1 source 'https://rubygems.org' 2 2 3 3 if Gem::Version.new(Bundler::VERSION) < Gem::Version.new('1.5.0') 4 4 abort "Redmine requires Bundler 1.5.0 or higher (you're using #{Bundler::VERSION}).\nPlease update with 'gem update bundler'." 5 5 end 6 6 7 7 gem "rails", "4.2.5" 8 8 gem "jquery-rails", "~> 3.1.4" 9 9 gem "coderay", "~> 1.1.0" 10 10 gem "builder", ">= 3.0.4" 11 11 gem "request_store", "1.0.5" 12 12 gem "mime-types" 13 13 gem "protected_attributes" 14 14 gem "actionpack-action_caching" 15 15 gem "actionpack-xml_parser" 16 16 gem "roadie-rails" 17 17 18 18 # Windows does not include zoneinfo files, so bundle the tzinfo-data gem 19 19 gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin, :jruby] 20 20 gem "rbpdf", "~> 1.19.0" 21 21 22 22 # Optional gem for LDAP authentication 23 23 group :ldap do 24 24 gem "net-ldap", "~> 0.12.0" 25 25 end 26 26 27 27 # Optional gem for OpenID authentication 28 28 group :openid do 29 29 gem "ruby-openid", "~> 2.3.0", :require => "openid" 30 30 gem "rack-openid" 31 31 end 32 32 33 33 platforms :mri, :mingw, :x64_mingw do 34 34 # Optional gem for exporting the gantt to a PNG file, not supported with jruby 35 35 group :rmagick do 36 36 gem "rmagick", ">= 2.14.0" 37 37 end 38 38 39 39 # Optional Markdown support, not for JRuby 40 40 group :markdown do 41 41 gem "redcarpet", "~> 3.3.2" 42 42 end 43 43 end 44 44 45 45 platforms :jruby do 46 46 # jruby-openssl is bundled with JRuby 1.7.0 47 47 gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0' 48 48 gem "activerecord-jdbc-adapter", "~> 1.3.2" 49 49 end 50 50 51 51 # Include database gems for the adapters found in the database 52 52 # configuration file 53 53 require 'erb' 54 54 require 'yaml' 55 55 database_file = File.join(File.dirname(__FILE__), "config/database.yml") 56 56 if File.exist?(database_file) 57 57 database_config = YAML::load(ERB.new(IO.read(database_file)).result) 58 58 adapters = database_config.values.map {|c| c['adapter']}.compact.uniq 59 59 if adapters.any? 60 60 adapters.each do |adapter| 61 61 case adapter 62 62 when 'mysql2' 63 63 gem "mysql2", "~> 0.3.11", :platforms => [:mri, :mingw, :x64_mingw] 64 64 gem "activerecord-jdbcmysql-adapter", :platforms => :jruby 65 65 when 'mysql' 66 66 gem "activerecord-jdbcmysql-adapter", :platforms => :jruby 67 67 when /postgresql/ 68 68 gem "pg", "~> 0.18.1", :platforms => [:mri, :mingw, :x64_mingw] 69 69 gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby 70 70 when /sqlite3/ 71 71 gem "sqlite3", :platforms => [:mri, :mingw, :x64_mingw] 72 72 gem "jdbc-sqlite3", ">= 3.8.10.1", :platforms => :jruby 73 73 gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby 74 74 when /sqlserver/ 75 75 gem "tiny_tds", "~> 0.6.2", :platforms => [:mri, :mingw, :x64_mingw] 76 76 gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw, :x64_mingw] 77 77 else 78 78 warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems") 79 79 end 80 80 end 81 81 else 82 82 warn("No adapter found in config/database.yml, please configure it first") 83 83 end 84 84 else 85 85 warn("Please configure your config/database.yml first") 86 86 end 87 87 88 88 group :development do 89 89 gem "rdoc", ">= 2.4.2" 90 90 gem "yard" 91 91 end 92 92 93 93 group :test do 94 94 gem "minitest" 95 95 gem "rails-dom-testing" 96 96 gem "mocha" 97 97 gem "simplecov", "~> 0.9.1", :require => false 98 98 # For running UI tests 99 99 gem "capybara" 100 100 gem "selenium-webdriver" 101 101 end 102 102 103 103 local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local") 104 104 if File.exists?(local_gemfile) 105 105 eval_gemfile local_gemfile 106 106 end 107 107 108 108 # Load plugins' Gemfiles 109 109 Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file| 110 110 eval_gemfile file 111 111 end

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

gorogoroIT

2017/03/30 11:45

最後のメッセージに原因がありそうなので、"config/database.yml" の内容を、追記して頂けますでしょうか。
haskins2341

2017/03/30 11:47

ご回答ありがとうございます!やってみます
haskins2341

2017/03/30 12:00

すいません勘違いしました!!
guest

回答2

0

"database.yml" に以下のような記述があるのですが、どこから出てきたものですか。

adapters = database_config.values.map {|c| c['adapter']}.compact.uniq

削除して、bundle install --without development test を実行すると
どうなりますでしょうか。


今回、redmineで利用しているデータベースは、「MySQL」と「PostgreSQL」のどちらなのでしょうか。

投稿2017/03/30 12:16

gorogoroIT

総合スコア447

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

haskins2341

2017/03/30 12:26

すばやい対応ありがとうございます! 「PostgreSQL」使ってます adapters = database_config.values.map {|c| c['adapter']}.compact.uniq これはさっき勘違いしてエラー文に出ているものを追記してしまいました なくてもエラーがでてしまようです、、
haskins2341

2017/03/30 12:27

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 machine. [!] There was an error parsing `Gemfile`: undefined method `[]' for nil:NilClass. Bundler cannot continue. # from /opt/redmine-3.2.0/Gemfile:58 # ------------------------------------------- # database_config = YAML::load(ERB.new(IO.read(database_file)).result) > adapters = database_config.values.map {|c| c['adapter']}.compact.uniq # if adapters.any? # ------------------------------------------- 消してやったときのエラー文です
haskins2341

2017/03/30 12:29

今日はもう帰りますが明日Redmine自体を再インストールしてみようかと思います エラーについてなにかお分かりであればお手数ですがご教授いただけるとうれしいです。。。
gorogoroIT

2017/03/30 12:30

「PostgreSQL」ならば、以下の内容だけ記述してみるとか。(他の内容は、バッサリ削除) # PostgreSQL configuration example production: adapter: postgresql database: redmine host: localhost username: postgres password: "postgres" encoding: utf8
guest

0

Redmineを使うことが目的なのであれば、インストールの簡単なbitnami Redmineを使うとよいでしょう。

https://bitnami.com/stack/redmine/installer

投稿2017/03/30 11:44

kongou-ae

総合スコア432

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

haskins2341

2017/03/30 11:57

bitnamiはサーバーの要領不足で使用できませんでした、、泣
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問