Hi,
I’m having a weird problem:
[~/rails/hip]# rake routes
(in /home/mydomain/rails/hip)
Missing these required gems:
ruby-openid >= 2.0.4
You’re running:
ruby 1.8.6.287 at /usr/bin/ruby
rubygems 1.3.1 at /home/mydomain/.gem/ruby/1.8, /usr/lib/ruby/gems/1.8
Run rake gems:install
to install the missing gems.
I found it when trying to run a migration with rake.
BUT the ruby-openid gem is installed and is working in the application,
I can use it.
This is what I have in the environment.rb:
ENV[‘GEM_PATH’] = ‘/home/mydomain/ruby/gems’
Removing that causes the app not to start.
This is what I get with gem env:
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.1
- RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/mydomain/ruby/gems
- RUBY EXECUTABLE: /usr/bin/ruby
- EXECUTABLE DIRECTORY: /home/mydomain/ruby/gems/bin
- RUBYGEMS PLATFORMS:
- GEM PATHS:
- /home/mydomain/ruby/gems
- /home/mydomain/.gem/ruby/1.8
- /usr/lib/ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- “gem” => “–remote --gen-rdoc --run-tests”
- “gemhome” => “/home/mydomain/ruby/gems”
- “gempath” =>
[“/home/mydomain/.gem/ruby/1.8:/usr/lib/ruby/gems/1.8”]
- “rdoc” => “–inline-source --line-numbers”
- REMOTE SOURCES:
Any hints anyone??
Btw it is funny that running gem which ruby-openid gives:
Can’t find ruby library file or shared library ruby-openid
But that should be ok, I get the same in my local environment.
Thank you in advance.
Hi, any ideas anyone why a gem wouldn’t be found even if I can use it?
And it would break the rake command?
I guess it is some configuration but I can’t get it to work.
Cheers.
Hi,
Still fighting with this one. I think the problem is actually the
open_id_authentication plugin, not the ruby-openid gem.
This is the init.rb of the pluging, which should be ok and up to rails
2.x changes.
if config.respond_to?(:gems)
config.gem ‘ruby-openid’, :lib => ‘openid’, :version => ‘>=2.0.4’
else
begin
require ‘openid’
rescue LoadError
begin
gem ‘ruby-openid’, ‘>=2.0.4’
rescue Gem::LoadError
puts “Install the ruby-openid gem to enable OpenID support”
end
end
end
config.to_prepare do
ActionController::Base.send :include, OpenIdAuthentication
end
But still running rake gives:
[~/rails/try]# rake
(in /home/mydomain/rails/try)
Missing these required gems:
ruby-openid >= 2.0.4
You’re running:
ruby 1.8.6.287 at /usr/bin/ruby
rubygems 1.3.1 at /home/mydomain/.gem/ruby/1.8, /usr/lib/ruby/gems/1.8
Run rake gems:install
to install the missing gems.
Lots of googling lately but no real hints how to solve it.
As mentioned the funny thing is that I can use openid in the app with no
problems. The feature works.
Cheers.
The call should be:
gem 'ruby-openid', :lib => 'openid'
The name of the file to be required is ‘openid’ and not ruby-openid.
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/
(en)
João Pessoa, PB, +55 83 8867-7208
On Fri, Nov 7, 2008 at 6:05 PM, comopasta Gr
Hey, Mauricio thanks a lot for dropping by.
The call should be:
gem ‘ruby-openid’, :lib => ‘openid’
Isn’t that covered with this line in the init.rb?
config.gem ‘ruby-openid’, :lib => ‘openid’, :version => ‘>=2.0.4’
Maybe I didn’t get your point. Do you mean a similar call is needed
somewhere else?
Regards
Oh, i’m sorry, i missed it, just saw the::
gem 'ruby-openid', '>=2.0.4'
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/
(en)
João Pessoa, PB, +55 83 8867-7208
On Fri, Nov 7, 2008 at 6:20 PM, comopasta Gr
Hi,
Gbesch thanks for the hints.
I don’t own the server so I guess I can’t go too deep with the settings.
But if it was a problem with users shouldn’t affect other plugins as
well. I run other plugins and the problem only occurs when
open_id_authentication is in the vendor/plugins folder.
I have not problem with using the gem or the plugin at all. What I’m
doing now is that whenever I need to run a rake command, migrate of
something I remove the plugin, do the stuff and then put it back. It is
crappy but works. When I have my own server it will be different (I
hope).
Regards
Hi, any ideas anyone why a gem wouldn’t be found even if I can use it?
I had a similar problem a while back.
I’d upgraded from ruby 1.8.6 to 1.8.7 and the default installation
path changed from /usr/bin to /usr/local/bin. I upgraded rubygems at
the same time and reinstalled all my gems, so I had two complete
versions of both ruby and rubygems on my system.
After the upgrade things got strange. When I ran any of my ruby
scripts from the console they worked perfectly, but when I ran them
from the rails app it couldn’t find a couple of recently-installed
gems.
It finally dawned upon me that it was a difference in paths: I was
running the console as user ‘root’, but the rails app was being run
under a mongrel cluster as user ‘mongrel’. I set a global path to
ruby for all users in /etc/profile and restarted the mongrels, and
suddenly the rails app started working
On Nov 6, 2:41 am, Pod C. [email protected]