Redmine & rubygem

Ciao,
ho il seguente ambiente:

so: CentOS release 5.5 (Final)
ruby: ruby 1.8.7 (2010-12-23 patchlevel 330) [x86_64-linux]
gem: 1.3.1
rails: 2.3.5
rack: 1.0.1
redmine: 1.1.2

senza il file config/email.yml riesce a partire e mi sembra che tutte le
funzioni siano attive,
non appena applico la conf dentro email.yml ho errori di questo tipo:

Using rails adapter
/opt/redmine/config/…/vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning:
Gem::Dependency#version_requirements is deprecated and will be removed
on or after A
ugust 2010. Use #requirement

Exiting!

con rails 2.3.11 non riuscivo a conciliare la versione di rack,
grazie

Andrea

(sudo) gem update --system
Installer l’ultima versione di RubyGems, la 1.5.2

Luca

http://about.me/jodosha

Il giorno 07/apr/2011, alle ore 11.59, Luca G. ha scritto:

(sudo) gem update --system
Installer l’ultima versione di RubyGems, la 1.5.2

Luca

Ciao Luca,
ho aggiornato la versione di rubygem alla 1.5.2 ed ottengo il seguente
errore:

Writing PID to tmp/pids/thin.3000.pid
Using rails adapter
Exiting!
/opt/redmine/config/…/vendor/rails/railties/lib/rails/gem_dependency.rb:119:in
requirement': undefined local variable or methodversion_requirements’
for #Rails::GemDependency:0x2b5336f9ace0 (NameError)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:254:in activate' from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:1204:ingem’
from
/opt/redmine/config/…/vendor/rails/railties/lib/rails/gem_dependency.rb:73:in
add_load_paths' from /opt/redmine/config/../vendor/rails/railties/lib/initializer.rb:301:inadd_gem_load_paths’
from
/opt/redmine/config/…/vendor/rails/railties/lib/initializer.rb:301:in
each' from /opt/redmine/config/../vendor/rails/railties/lib/initializer.rb:301:inadd_gem_load_paths’
from
/opt/redmine/config/…/vendor/rails/railties/lib/initializer.rb:132:in
process' from /opt/redmine/config/../vendor/rails/railties/lib/initializer.rb:113:insend’
from
/opt/redmine/config/…/vendor/rails/railties/lib/initializer.rb:113:in
run' from /opt/redmine/config/environment.rb:20 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:ingem_original_require’
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
require' from /usr/local/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/rack/adapter/rails.rb:37:inload_application’
from
/usr/local/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/rack/adapter/rails.rb:23:in
initialize' from /usr/local/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/rack/adapter/loader.rb:48:innew’
from
/usr/local/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/rack/adapter/loader.rb:48:in
for' from /usr/local/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/controllers/controller.rb:169:inload_adapter’
from
/usr/local/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/controllers/controller.rb:73:in
start' from /usr/local/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:185:insend’
from
/usr/local/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:185:in
run_command' from /usr/local/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:151:inrun!’
from /usr/local/lib/ruby/gems/1.8/gems/thin-1.2.11/bin/thin:6
from /usr/local/bin/thin:19:in `load’
from /usr/local/bin/thin:19

riuscite ad aiutarmi ?
grazie

Andrea

Il giorno 07/apr/2011, alle ore 13.12, Luca G. ha scritto:

Cosa c’ qui? config/environment.rb:20

Luca

trovo questo:

Load Engine plugin if available

begin
require File.join(File.dirname(FILE),
‘…/vendor/plugins/engines/boot’)
rescue LoadError

Not available

end

Rails::Initializer.run do |config|

Settings in config/environments/* take precedence those specified

here

Skip frameworks you’re not going to use

config.frameworks -= [ :action_web_service, :action_mailer ]

Add additional load paths for sweepers

config.load_paths += %W( #{RAILS_ROOT}/app/sweepers )

la riga 20 e’ quella in grassetto,

andrea

Cosa c’ qui? config/environment.rb:20

Luca

Il giorno 07/apr/2011, alle ore 13.44, [email protected] ha scritto:

rescue LoadError

Not available

end

mi sono accorto di aver postato un problema che avevo gia’ mandato in
ML:
http://www.ruby-forum.com/topic/1182895

che mi riportava al support di redmine:
http://www.redmine.org/issues/7516

da li avevo seguito il consiglio di andare su rails 2.3.11 ma non ho
piu’ saputo conciliare la versione di rails con quella di rack (magari
ci riprovero’),
adesso ho apportato direttamente la patch consigliata:

if Gem::VERSION >= “1.3.6”
module Rails
class GemDependency
def requirement
r = super
(r == Gem::Requirement.default) ? nil : r
end
end
end
end

dentro config/environment.rb che mi risolve perfettamente il problema,
grazie

Andrea

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs