Project

General

Profile

Openid option unavailable, even though ruby-openid-2.1.7 is in place

Added by Dave Carpeneto over 14 years ago

Hi all - odd issue - I have the following in place:

  1. gem list | grep -i openid
    ar_openid_store (0.0.1)
    dominiquebrezinski-rack-openid (1.0.3)
    local-openid (0.1.1)
    merb_openid (0.0.4)
    oa-openid (0.0.2)
    openid (0.0.1)
    openid_auth (1.0.2)
    openid_dm_store (0.1.3)
    openid_fu_generator (0.0.1)
    openid_login_generator (0.1)
    openid_mongodb_store (0.1.2)
    pelle-ruby-openid (2.1.9)
    rack-openid (1.0.3)
    rails_openid (0.2.0)
    ruby-openid (2.1.7)
    ruby-openid-apps-discovery (1.01)
    warden-openid (0.0.1)

    ... and I'm currently running with redmine-0.9.4, however I'm not seeing the "Allow OpenID login and registration" checkbox being available. The logs don't mention any sort of error either ...

FWIW here's some other stats (in case this makes a difference):

- ruby 1.8.7 (2008-06-20 patchlevel 22) [i686-linux]
- rails (2.3.5)
- rack (1.1.0)
- rubygems 1.3.5
- Linux 2.6.33.1/i386 (on a hostgator managed server running mongrel)
- Mysql 5.1.30

... I'm 100% new to rails (picking this up solely to deploy redmine - this is the greatest ticket system I've ever seen, and I've worked with a lot), so this may be an obvious thing ...

A thanks for any assistance that may be available - Dave


Replies (17)

RE: Openid option unavailable, even though ruby-openid-2.1.7 is in place - Added by Dave Carpeneto over 14 years ago

here's the about output (sorry for not including this in the initial report) :

About your application's environment
Ruby version 1.8.7 (i686-linux)
RubyGems version 1.3.5
Rack version 1.0
Rails version 2.3.5
Active Record version 2.3.5
Active Resource version 2.3.5
Action Mailer version 2.3.5
Active Support version 2.3.5
Edge Rails revision unknown
Application root /home/carpenet/rails_apps/redmine
Environment production
Database adapter mysql
Database schema version 20100221100219

RE: Openid option unavailable, even though ruby-openid-2.1.7 is in place - Added by Felix Schäfer over 14 years ago

2 "obvious" things that come to mind: have you restarted the redmine server after installing the openid gem? Is the gem installed globally, i.e. can the redmine server access it? If this doesn't help, please tell me if you are command line-savvy, that would make debugging/problem finding easier.

RE: Openid option unavailable, even though ruby-openid-2.1.7 is in place - Added by Dave Carpeneto over 14 years ago

have you restarted the redmine server after installing the openid gem?

Indeed I did. No dice.

Is the gem installed globally, i.e. can the redmine server access it?

That one I dunno about - I have to plead ignorance here. All I can say is that it showed up on 'gem list' before I installed redmine, and the following command seems to give no errors:

# gem install ruby-openid
Successfully installed ruby-openid-2.1.7
1 gem installed
Installing ri documentation for ruby-openid-2.1.7...
Installing RDoc documentation for ruby-openid-2.1.7...
# echo $?
0

... tell me what to check for & I'll happing tell you.

If this doesn't help, please tell me if you are command line-savvy, that would make debugging/problem finding easier.

I am.

Thanks very, very, very much for responding - this is a great application, and I'd love to get openid integration working :-)

RE: Openid option unavailable, even though ruby-openid-2.1.7 is in place - Added by Dave Carpeneto over 14 years ago

OK, since you mentioned Is the gem installed globally I've played about with the gem utility, and I've figured out the answer to your question:
  1. my "gem install ruby-openid" made a local copy of this gem
  2. I've since removed it, and this now shows up as remote (assuming this is global):
    # gem list ruby-openid
    
    *** REMOTE GEMS ***
    
    ruby-openid (2.1.7)
    ruby-openid-apps-discovery (1.01)
    
    
  3. I've then restarted redmine, but no change - the option is still greyed out :-(

RE: Openid option unavailable, even though ruby-openid-2.1.7 is in place - Added by Felix Schäfer over 14 years ago

gem install is the right command all right, let me just finish my other post ;-) You can re-install the gem safely, i.e. gem install ruby-openid.

RE: Openid option unavailable, even though ruby-openid-2.1.7 is in place - Added by Felix Schäfer over 14 years ago

Well, if the gem is installed as root, it should be globally available.

Anyway, log in as the user running the webserver/mongrel, got to your redmine directory and run ./script/console production, this will get you an irb (interactive ruby) console with the whole redmine app with the environment production loaded. Without doing anything else before, try Object.const_defined?(:OpenID), that should yield true if the ruby-openid gem is installed correctly (i.e. so that redmine can load it).

RE: Openid option unavailable, even though ruby-openid-2.1.7 is in place - Added by Dave Carpeneto over 14 years ago

OK, so I cannot login as the apache user (it's a shared server), however there's obviously something wrong since I get a false on this:

# ./script/console production
Loading production environment (Rails 2.3.5)
>> Object.const_defined?(:OpenID)
=> false

... so if I cannot get this to work. I've re-installed a local copy of ruby-openid & ruby-openid-apps-discovery, and the outcome does not change.

RE: Openid option unavailable, even though ruby-openid-2.1.7 is in place - Added by Felix Schäfer over 14 years ago

Mmh, if it's a shared host I'd recommend seeing what your provider says about this. I'm sure there would be a way to bundle them or whatever, but their website says they will install additional gems for you, so see if they are able to help.

RE: Openid option unavailable, even though ruby-openid-2.1.7 is in place - Added by Dave Carpeneto over 14 years ago

That did it. No idea why it 'gem list ruby-openid' returned without error, but it was not installed globally.

Thanks for your help - appreciated :-)

RE: Openid option unavailable, even though ruby-openid-2.1.7 is in place - Added by Anup Nair about 13 years ago

I am facing same issue.
centos x86_64 + Apache 2 + Passenger

#gem list ruby-openid
*** LOCAL GEMS ***
ruby-openid (2.1.8)
ruby-openid-apps-discovery (1.2.0)

ruby-openid is install as root. I can see the package in gem local list, yet I get the following output:

./script/console production
Loading production environment (Rails 2.3.11)
>> Object.const_defined?(:OpenID)
=> false

The output is 'false' in both cases, when run as user root or as apache user.

I have root access to the webserver.
Kindly help.

RE: Openid option unavailable, even though ruby-openid-2.1.7 is in place - Added by Mischa The Evil about 13 years ago

Just a hint: did you restart your webserver after the installation of the gem?

RE: Openid option unavailable, even though ruby-openid-2.1.7 is in place - Added by Anup Nair about 13 years ago

I did restart (stop-n-start) apache post gem installation. Do I have to install ruby-openid in redmine/vendor/gems/ folder? if so how? (source tarball?)

RE: Openid option unavailable, even though ruby-openid-2.1.7 is in place - Added by Anup Nair about 13 years ago

Update:

I uninstall ruby-openid gem version 2.1.8 and replaced it with version 2.1.7

Reason: I did not find a version 2.1.8 on rubyforge
Gave it a shot and check this out:

./script/console production
Loading production environment (Rails 2.3.11)
>> Object.const_defined?(:OpenID)
=> *true*

But, the option for Authetication is still grayed out in the settings !

RE: Openid option unavailable, even though ruby-openid-2.1.7 is in place - Added by Mischa The Evil about 13 years ago

I am not familiar with the OpenID-feature but tried to replicate your issue on a current source:/trunk@7791 running on a test-server powered by Ubuntu 10.04 LTS:

root@xxx:~# gem install ruby-openid
  Fetching: ruby-openid-2.1.8.gem (100%)
  Successfully installed ruby-openid-2.1.8
  1 gem installed
  Installing ri documentation for ruby-openid-2.1.8...
  Installing RDoc documentation for ruby-openid-2.1.8...
root@xxx:~# service apache2 restart
  * Restarting web server apache2
  ... waiting ....                                    [ OK ]
root@xxx:~# cd /path/to/redmine/
root@xxx:/path/to/redmine# ./script/console production
  Loading production environment (Rails 2.3.14)
  NOTE: RubyGem compatibility notes scrubbed to keep it readable...
  Object.const_defined?(:OpenID)
  >> Object.const_defined?(:OpenID)
  => true
  ^C
root@xxx:/path/to/redmine# 

Next, I browse to hxxp://www.host.tld/settings?tab=authentication and see that the check-box for 'Allow OpenID login and registration'-setting is changeable.

Thus, I am not able to replicate this issue...

RE: Openid option unavailable, even though ruby-openid-2.1.7 is in place - Added by Anup Nair about 13 years ago

Hi,

There were two issues.

1. I had initially installed ruby-openid 2.1.8 (it was installed as default by gem install). With this version redmine's script could not detect the object openid. Perhaps a version constraint. I replaced it with version 2.1.7 and that fixed it. However, option for enabling OpenID is still greyed out in web GUI.

2. Option for enabling OpenID from web GUI is still greyed out:
I had initially enabled LDAP authentication and some users were created on the fly as they logged in. Later I was asked to switch authentication to OpenID. Also, on adding OpenID-selector plugin I got internal server error (500). My guess is that few thing I did may have messed up the DB.
As the redmine instance was new and in trial stage, I decided to start afresh.
Got rid of the DB and Redmine. Replaced both with fresh installs. This time I added ruby-openid to the bundle install list with version specific to 2.1.7.

In the end, it worked! OpenID option is available.

Now I am fire fighting to set it up with Google Apps account. I must add that there is very limited and unclear documentation on this topic (OpenID with Google Apps.). It has taken me to code level patching/modifications and I am not good at it. Hoping to get some help from colleagues. If successful, I shall add a document.

Thanks!

RE: Openid option unavailable, even though ruby-openid-2.1.7 is in place - Added by Ruben Silva almost 13 years ago

Hi, I was struggling with this for a while now. Thank for all your comments, they where useful to find my solution.

My solution was add the following to the end of the Gemfile:

gem "ruby-openid" 
gem "ruby-openid-apps-discovery" 

Hope it helps someone in the same trouble.

    (1-17/17)