Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bundle exec errors #242

Open
ak-digital-endeavours opened this issue Feb 9, 2015 · 12 comments
Open

bundle exec errors #242

ak-digital-endeavours opened this issue Feb 9, 2015 · 12 comments

Comments

@ak-digital-endeavours
Copy link

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
Copy link

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
Copy link

jimmys commented Sep 16, 2015

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
Copy link

sg552 commented Mar 14, 2016

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

@Prajjwal
Copy link

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
Copy link

sg552 commented Nov 14, 2017

Still have this error. ruby 2.2.4. linux.

@samanihamid
Copy link

samanihamid commented Dec 12, 2017

Will "rubycas-server" support ruby 2.4.2?

@kajal98
Copy link

kajal98 commented Sep 8, 2020

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

@sg552
Copy link

sg552 commented Sep 10, 2020

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

@mitfik
Copy link
Contributor

mitfik commented Sep 10, 2020

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
Copy link

sg552 commented Sep 14, 2020

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
Copy link
Contributor

mitfik commented Sep 16, 2020

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
Copy link

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants