rubycas / rubycas-server

Provides single sign-on authentication for web applications, implementing the server-end of Jasig's CAS protocol.
http://rubycas.github.com
Other
628 stars 270 forks source link

bundle exec errors #242

Open ak-digital-endeavours opened 9 years ago

ak-digital-endeavours commented 9 years ago

Hi, I'm on CentOS 7. I followed the quickstart instructions using mariadb with mysql2 and activesupport-mysql2-adapter. When I get to bundle exec rubycas-server -c config/config.yml

I get

=> Using custom config file "config/config.yml" /home/deploy/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.21/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now /home/deploy/.rvm/gems/ruby-2.2.0/gems/r18n-core-1.1.11/lib/r18n-core/yaml_methods.rb:34:in detect_yaml_private_type': uninitialized constant Psych::ENGINE (NameError) from /home/deploy/.rvm/gems/ruby-2.2.0/gems/r18n-core-1.1.11/lib/r18n-core/yaml_loader.rb:42:ininitialize' from /home/deploy/.rvm/gems/ruby-2.2.0/gems/r18n-core-1.1.11/lib/r18n-core.rb:160:in new' from /home/deploy/.rvm/gems/ruby-2.2.0/gems/r18n-core-1.1.11/lib/r18n-core.rb:160:inmodule:R18n' from /home/deploy/.rvm/gems/ruby-2.2.0/gems/r18n-core-1.1.11/lib/r18n-core.rb:40:in <top (required)>' from /home/deploy/.rvm/gems/ruby-2.2.0/gems/sinatra-r18n-1.1.11/lib/sinatra/r18n.rb:22:in<top (required)>' from /home/deploy/cas/lib/casserver/base.rb:2:in <top (required)>' from /home/deploy/cas/lib/casserver/server.rb:3:in<top (required)>' from /home/deploy/cas/lib/casserver.rb:18:in require' from /home/deploy/cas/lib/casserver.rb:18:in<top (required)>' from /home/deploy/cas/bin/rubycas-server:28:in require' from /home/deploy/cas/bin/rubycas-server:28:in<top (required)>' from /home/deploy/.rvm/gems/ruby-2.2.0/bin/rubycas-server:23:in load' from /home/deploy/.rvm/gems/ruby-2.2.0/bin/rubycas-server:23:in

' from /home/deploy/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in eval' from /home/deploy/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in
'

my config.yml looks like this

server: webrick port: 443 ssl_cert: /home/deploy/cas/ssl/rubycas-server-demo.pem database: adapter: mysql2 database: cas_server username: cas password: password host: localhost reconnect: true authenticator: class: CASServer::Authenticators::LDAP ldap: host: ldap.domain.org.uk port: 389 base: 'dc=domain,dc=org,dc=uk' username_attribute: uid filter: (objectClass=person) auth_user: 'cn=casauth,ou=ldapadmin,dc=domain,dc=org,dc=uk' auth_password: 'password' theme: simple organization: CAS infoline: Powered by RubyCAS-Server log: file: /home/deploy/casserver.log level: DEBUG

What am I missing?

RyanSnodgrass commented 9 years ago

I know I'm late to this issue, but I get the same problem with the same setup. Centos, running ruby 2.2.2. It seems to be something to do with syck being unsupported past 2.2. The ruby docs state that syck was removed in 2.0.0, but I was able to get past this error by downgrading my ruby version to 2.1.5. There is an open issue in the syck gem on this subject.

jimmys commented 9 years ago

The problem is this code in the r18n-core gem:

# r18n-core-1.1.11/lib/r18n-core/yaml_methods.rb
#...
module R18n
  # Base methods to load translations for YAML.
  # It is used by YAML and Rails loaders.
  module YamlMethods
    # Detect class for private type depend on YAML parser.
    def detect_yaml_private_type
      @private_type_class = if defined?(JRUBY_VERSION)
        ::YAML::Yecht::PrivateType
      elsif '1.8.' == RUBY_VERSION[0..3]
        ::YAML::PrivateType
      elsif 'syck' == ::YAML::ENGINE.yamler
        ::Syck::PrivateType
      end
    end

YAML::ENGINE is removed in Ruby 2.2 (see https://bugs.ruby-lang.org/issues/8344 )

So this method in the r18n gem needs to be updated to understand Psych as the YAML engine.

And it may mean that RubyCAS needs to update the .yml files by loading with Syck and dumping with Psych.

See http://devblog.arnebrasseur.net/2014-02-yaml-syck-vs-psych and http://www.darwinweb.net/articles/convert-syck-to-psych-yaml-format

sg552 commented 8 years ago

why is this issue closed? Does this mean "rubycas-server" will not support ruby 2.2?

Prajjwal commented 8 years ago

Exact same problem on Ruby 2.3.0 on Linux. It's sad that this project is not being updated for newer Ruby versions.

 NameError: uninitialized constant Psych::ENGINE
sg552 commented 6 years ago

Still have this error. ruby 2.2.4. linux.

samanihamid commented 6 years ago

Will "rubycas-server" support ruby 2.4.2?

kajal98 commented 4 years ago

Still have the same error in ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux].

sg552 commented 4 years ago

seems this project is abandon by authers. I will opensource my project ( another CAS based on ruby ) in future.

mitfik commented 4 years ago

Is not abandon. Just lack of time. Feel free to contribute it's open source!. If you would commit long term you can become maintainer. Personally I have plans to extend functionality of Ruby CAS with SSI in the future but due to the commitments in other projects didn't had time to look here recently.

sg552 commented 4 years ago

thanks for your response! In fact I am very thankful for your job! and there's a fact that there's no such heavy weight of CAS implementation in the Ruby world. CAS is very useful and important for the growing & big projects.

I would consider how to improve this project and it would be great if you allow someone to maintain this project.

mitfik commented 4 years ago

Sure thing, as soon as I would notice substantial contribution from you or someone else who would willing to help move the project, I am more then happy to grant maintainer rights.

thosgood commented 2 years ago

are there any more modern (not necessarily Ruby) alternatives to rubycas-server now? people in ~2015 seemed to recommend CASino, but this no longer exists...