Project

General

Profile

Redmine 0.9.3: db:migrate -> Error: ruby-openid(2.1.7 not ~> 2.0.0)

Added by Seb Ha ag about 14 years ago

Hello,

I´m trying to install redmine 0.9.3 on Debian (Lenny). I followed the instructions (wiki) and at point 5 I get an the error: RubyGem version error: ruby-openid(2.1.7 not ~> 2.0.0)

Do I have to use exactly version 2.0.0? Does this version exist?
Any idea how to fix this?

Any help is appreciated! Thanks.

root:/opt/redmine > RAILS_ENV=production rake db:migrate
(in /opt/redmine-0.9.3)
rake aborted!
RubyGem version error: ruby-openid(2.1.7 not ~> 2.0.0)

Installed gems:

root:/opt/redmine > gem list --local

*** LOCAL GEMS ***

actionmailer (2.3.5, 2.1.2)
actionpack (2.3.5, 2.1.2)
activerecord (2.3.5, 2.1.2)
activeresource (2.3.5, 2.1.2)
activesupport (2.3.5, 2.1.2)
builder (2.1.2)
camping (1.5.180)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
fastthread (1.0.7)
fcgi (0.8.8)
gem_plugin (0.2.3)
markaby (0.5)
memcache-client (1.8.0)
metaid (1.0)
mongrel (1.1.5)
mysql (2.8.1)
passenger (2.2.7)
rack (1.0.1)
rails (2.3.5, 2.1.2)
rake (0.8.7)
ruby-openid (2.1.7)
ruby-yadis (0.3.4)
test-spec (0.10.0)
root:/opt/redmine > RAILS_ENV=production script/about
./script/../config/../vendor/rails/railties/lib/initializer.rb:271:in `require_frameworks': RubyGem version error: ruby-openid(2.1.7 not ~> 2.0.0) (RuntimeError)
        from ./script/../config/../vendor/rails/railties/lib/initializer.rb:134:in `process'
        from ./script/../config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
        from ./script/../config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
        from /opt/redmine-0.9.3/config/environment.rb:20
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from /opt/redmine-0.9.3/vendor/rails/railties/lib/commands/about.rb:1
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from script/about:4

Replies (5)

RE: Redmine 0.9.3: db:migrate -> Error: ruby-openid(2.1.7 not ~> 2.0.0) - Added by Holger Just about 14 years ago

You can use any openid-gem with a version like 2.0.x.

The ~> (notice the tilde) effectively says that the very last part of the stated version can vary (i.e. can be larger or equal to the stated value). All other parts of the version string have to be exactly as stated.

--Holger

RE: Redmine 0.9.3: db:migrate -> Error: ruby-openid(2.1.7 not ~> 2.0.0) - Added by Seb Ha ag about 14 years ago

thanks Holger, I didn´t know the meaning of the tilde.

Now I was looking for a version like 2.0.x, but didn´t find any. On my (only) gem-source gems.rubyforge.org, there is no version like that (http://rubygems.org/search?query=ruby-openid). Only 2.1.7.

Ruby Openid is listed under "Optional components" (in the installation manual). What do I have to do to deactivate the usage of openid?

RE: Redmine 0.9.3: db:migrate -> Error: ruby-openid(2.1.7 not ~> 2.0.0) - Added by Holger Just about 14 years ago

Seb Ha ag wrote:

Now I was looking for a version like 2.0.x, but didn´t find any. On my (only) gem-source gems.rubyforge.org, there is no version like that (http://rubygems.org/search?query=ruby-openid). Only 2.1.7.

All available versions of the gem are listed here: http://rubygems.org/gems/ruby-openid/versions

You can easily install the latest matching release of the openid gem using

gem install ruby-openid -v "~> 2.0.0"

Ruby Openid is listed under "Optional components" (in the installation manual). What do I have to do to deactivate the usage of openid?

Redmine should just not use the gem if it is not present. The parts in the GUI are then disabled. Obviously, it chockes if there is a openid gem but with a non-matching version. So to really disable openid you could remove the gem altogether.

However, I just noticed something strange... Are you sure you are using a complete stack of Redmine 0.9.3? Because as I just checked it really requires ruby-openid >= 2.1.4 (which works at my place with 2.1.7) And even the very first version of the open_id_authentication plugin (r2438) required 2.0.4. Please have a look into vendor/plugins/open_id_authentication/init.rb. It should be exactly as shown here: source:branches/0.9-stable/vendor/plugins/open_id_authentication/init.rb This file should be the only place where the openid gem is required.

RE: Redmine 0.9.3: db:migrate -> Error: ruby-openid(2.1.7 not ~> 2.0.0) - Added by Seb Ha ag about 14 years ago

thanks for the hints. You see, I´m a total rails-noob ;-)

And you are right. The mentioned init.rb requires version 2.1.4!

So I uninstalled ruby-openid: gem uninstall ruby-openid

I checked with gem list --local and its gone.

(In the meantime I deleted my redmine folder and downloaded a fresh copy of redmine 0.9.3.)

Now I try db:migrate again:

root:/opt/redmine-0.9.3 > RAILS_ENV=production rake db:migrate
(in /opt/redmine-0.9.3)
rake aborted!
Could not find RubyGem ruby-openid (~> 2.0.0)

Something´s wrong here...

So I was checking in which files the string "ruby-openid" occurs. And thats the result:

root:/opt/redmine-0.9.3 > grep -r "ruby-openid" *
vendor/rails/railties/CHANGELOG:  config.gem "ruby-openid", :lib => "openid", :version => "1.1.4" 
vendor/plugins/open_id_authentication/test/test_helper.rb:gem 'ruby-openid'
vendor/plugins/open_id_authentication/init.rb:    gem 'ruby-openid', '>=2.1.4'
vendor/plugins/open_id_authentication/tasks/open_id_authentication_tasks.rake:    desc "Upgrade authentication tables from ruby-openid 1.x.x to 2.x.x" 
vendor/plugins/open_id_authentication/CHANGELOG:* Tied plugin to ruby-openid 1.1.4 gem until we can make it compatible with 2.x [DHH]
vendor/plugins/open_id_authentication/README:Provides a thin wrapper around the excellent ruby-openid gem from JanRan. Be sure to install that first:
vendor/plugins/open_id_authentication/README:  gem install ruby-openid

So I installed ruby-openid 2.1.7 again and changed the line gem 'ruby-openid', '>=2.1.4' to gem 'ruby-openid', but that didn´t change anything... same error.

Now I installed ruby-openid 2.0.4 (additional to 2.1.7):

root:/opt/redmine-0.9.3 > gem install ruby-openid -v "~> 2.0.0" 
Successfully installed ruby-openid-2.0.4
1 gem installed
Installing ri documentation for ruby-openid-2.0.4...
Installing RDoc documentation for ruby-openid-2.0.4...

And voila, my beloved error disappeared... and another showed up.

root:/opt/redmine-0.9.3 > RAILS_ENV=production rake db:migrate
(in /opt/redmine-0.9.3)
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
rake aborted!
Could not find RubyGem rake-compiler (~> 0.5)

(See full trace by running task with --trace)
root:/opt/redmine-0.9.3 > gem install rake-compiler -v "~> 0.5" 
ERROR:  Error installing rake-compiler:
        rake-compiler requires RubyGems version >= 1.3.5
root:/opt/redmine-0.9.3 > gem --version
1.2.0

Now I´m tired and go to bed... good night ;-)

RE: Redmine 0.9.3: db:migrate -> Error: ruby-openid(2.1.7 not ~> 2.0.0) - Added by Seb Ha ag about 14 years ago

after sleeping over it, I decided to 'apt-get purge' everything that has something to do with ruby or gems and start from zero (the needed apache packages weren´t deleted). The funny thing is, I already had a running version of redmine 0.8.7 on my debian lenny machine (for testing purposes). Now I wanted to start working with the current version 0.9.3 and nothing worked.

In the hope of helping someone else I will document the commands I used for the installation (It is not a complete installation manual).

Installing software:

apt-get update
apt-get install ruby ruby-dev libopenssl-ruby
apt-get install rubygems1.8

Getting redmine 0.9.3

svn co http://redmine.rubyforge.org/svn/tags/0.9.3 redmine-0.9.3

and edit config/database.yml (cp database.yml.example); Create database.

Update rubygems:

On debian gem update --system is disabled (see http://www.beier-christian.eu/blog/weblog/ruby-gem-update-is-disabled-on-debian/), so you have to run:

gem install rubygems-update
cd /var/lib/gems/1.8/bin/
./update_rubygems

Now, gem --version gives me: 1.3.6

gem install rake
gem install rails -v=2.3.5
gem install passenger
gem install mysql
/usr/bin/rake config/initializers/session_store.rb RAILS_ENV=production
/usr/bin/rake db:migrate RAILS_ENV=production
/usr/bin/rake redmine:load_default_data RAILS_ENV=production
chown -R www-data:www-data files log tmp public/plugin_assets
chmod -R 755 files log tmp public/plugin_assets

Now I restarted apache, but that failed because my passenger module had new paths and the loadfile wasn´t updated. So I had to run:

root:/usr/bin > ./passenger-install-apache2-module

After some compiling, it finished and told me to insert the following lines to /etc/apache2/mods-available/passenger.load:

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11
PassengerRuby /usr/bin/ruby1.8

Now, /etc/init.d/apache2 restart works and redmine is up and running! ;-)

Thanks to Holger, you really helped me!

Greets
Sebastian

    (1-5/5)