我使用Redmine SAML authentication plugin将redmine与我的应用程序集成,以便在redmine中启用单点登录(SSO),这使得用户可以使用相同的用户名和密码登录。 安装了ruby和rails版本。
ruby -v :ruby 1.9.3p551(2014-11-13修订版48407)[x86_64-linux]
rails -v :Rails 4.2.0
错误讯息:
There are no gemspecs at /opt/redmine/redmine-2.6.0. (Bundler::InvalidOption)
异常类:
PhusionPassenger::UnknownError
应用程序根目录:
/opt/redmine/redmine-2.6.0
回溯:
# File Line Location
0 /usr/lib/ruby/gems/1.8/gems/bundler-1.2.1/lib/bundler/dsl.rb 56 in `gemspec'
1 /opt/redmine/redmine-2.6.0/plugins/ruby-saml/Gemfile 3 in `eval_gemfile'
2 /opt/redmine/redmine-2.6.0/Gemfile 104 in `glob'
3 /opt/redmine/redmine-2.6.0/Gemfile 104 in `eval_gemfile'
4 /usr/lib/ruby/gems/1.8/gems/bundler-1.2.1/lib/bundler/dsl.rb 7 in `evaluate'
5 /usr/lib/ruby/gems/1.8/gems/bundler-1.2.1/lib/bundler/definition.rb 18 in `build'
6 /usr/lib/ruby/gems/1.8/gems/bundler-1.2.1/lib/bundler.rb 144 in `definition'
7 /usr/lib/ruby/gems/1.8/gems/bundler-1.2.1/lib/bundler.rb 112 in `setup'
8 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/utils.rb 326 in `prepare_app_process'
9 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/classic_rails/application_spawner.rb 176 in `initialize_server'
10 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/utils.rb 563 in `report_app_init_status'
11 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/classic_rails/application_spawner.rb 174 in `initialize_server'
12 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server.rb 204 in `start_synchronously'
13 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server.rb 180 in `start'
14 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/classic_rails/application_spawner.rb 149 in `start'
15 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/spawn_manager.rb 219 in `spawn_rails_application'
16 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server_collection.rb 132 in `lookup_or_add'
17 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/spawn_manager.rb 214 in `spawn_rails_application'
18 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server_collection.rb 82 in `synchronize'
19 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server_collection.rb 79 in `synchronize'
20 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/spawn_manager.rb 213 in `spawn_rails_application'
21 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/spawn_manager.rb 132 in `spawn_application'
22 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/spawn_manager.rb 275 in `handle_spawn_application'
23 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server.rb 357 in `__send__'
24 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server.rb 357 in `server_main_loop'
25 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server.rb 206 in `start_synchronously'
26 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/helper-scripts/passenger-spawn-server 99
对错误提供任何帮助,或者提供有关在redmine中启用SSO的不同方法的建议。
更新:/opt/redmine/redmine-2.6.0/Gemfile
source 'https://rubygems.org'
gem "rails", "3.2.19"
gem "jquery-rails", "~> 3.1.1"
gem "coderay", "~> 1.1.0"
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
gem "builder", ">= 3.0.4"
gem "request_store", "1.0.5"
gem "mime-types"
gem "rbpdf", "~> 1.18.1"
# Optional gem for LDAP authentication
group :ldap do
gem "net-ldap", "~> 0.3.1"
end
# Optional gem for OpenID authentication
group :openid do
gem "ruby-openid", "~> 2.3.0", :require => "openid"
gem "rack-openid"
end
platforms :mri, :mingw do
# Optional gem for exporting the gantt to a PNG file, not supported with jruby
group :rmagick do
# RMagick 2 supports ruby 1.9
# RMagick 1 would be fine for ruby 1.8 but Bundler does not support
# different requirements for the same gem on different platforms
gem "rmagick", ">= 2.0.0"
end
# Optional Markdown support, not for JRuby
group :markdown do
# TODO: upgrade to redcarpet 3.x when ruby1.8 support is dropped
gem "redcarpet", "~> 2.3.0"
end
end
platforms :jruby do
# jruby-openssl is bundled with JRuby 1.7.0
gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0'
gem "activerecord-jdbc-adapter", "~> 1.3.2"
end
# Include database gems for the adapters found in the database
# configuration file
require 'erb'
require 'yaml'
database_file = File.join(File.dirname(__FILE__), "config/database.yml")
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
if adapters.any?
adapters.each do |adapter|
case adapter
when 'mysql2'
gem "mysql2", "~> 0.3.11", :platforms => [:mri, :mingw]
gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
when 'mysql'
gem "mysql", "~> 2.8.1", :platforms => [:mri, :mingw]
gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
when /postgresql/
gem "pg", ">= 0.11.0", :platforms => [:mri, :mingw]
gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby
when /sqlite3/
gem "sqlite3", :platforms => [:mri, :mingw]
gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
when /sqlserver/
gem "tiny_tds", "~> 0.6.2", :platforms => [:mri, :mingw]
gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw]
else
warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
end
end
else
warn("No adapter found in config/database.yml, please configure it first")
end
else
warn("Please configure your config/database.yml first")
end
group :development do
gem "rdoc", ">= 2.4.2"
gem "yard"
end
group :test do
gem "shoulda", "~> 3.3.2"
gem "shoulda-matchers", "1.4.1"
gem "mocha", "~> 1.0.0", :require => 'mocha/api'
if RUBY_VERSION >= '1.9.3'
gem "capybara", "~> 2.1.0"
gem "selenium-webdriver"
end
end
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.exists?(local_gemfile)
puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v`
instance_eval File.read(local_gemfile)
end
# Load plugins' Gemfiles
Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file|
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
#TODO: switch to "eval_gemfile file" when bundler >= 1.2.0 will be required (rails 4)
instance_eval File.read(file), file
end
更新:/opt/redmine/redmine-2.6.0/plugins/ruby-saml/Gemfile
group :test do
if RUBY_VERSION < "1.9"
gem "nokogiri", "~> 1.5.0"
gem "ruby-debug", "~> 0.10.4"
elsif RUBY_VERSION < "2.0"
gem "debugger-linecache", "~> 1.2.0"
gem "debugger", "~> 1.6.4"
else
gem "byebug", "~> 2.1.1"
end
gem "shoulda", "~> 2.11"
gem "rake", "~> 10"
gem "mocha", "~> 0.14", :require => false
gem "timecop", "<= 0.6.0"
gem "systemu", "~> 2"
gem "rspec", "~> 2"
end