Наши проекты:
Журнал · Discuz!ML · Wiki · DRKB · Помощь проекту |
||
ПРАВИЛА | FAQ | Помощь | Поиск | Участники | Календарь | Избранное | RSS |
[3.138.114.38] |
|
Сообщ.
#1
,
|
|
|
Итак проблема =)
Операционная система Windows XP x64 Захотел я поставить баг трекер redmine ну помучался сначала с установкой по собственной инициативе =) Делал все по статье http://nightcoder.livejournal.com/6223.html За исключением нескольких вещей 1. Я поставил ruby 2.3.11 и потому что прочитал требования для новой версии redline (redmine-1.1.2) тут http://www.redmine.org/projects/redmine/wiki/RedmineInstall. Вобщем это и была инициатива типа а давайте все на новых версиях строить =). 2. У меня никак не хотела подключаться база mysql (rake db:migrate) и я нашел счастливого обладателя такой же поблемы тут http://railsforum.com/viewtopic.php?pid=107305#p107305 вобщем скачал тот mysqlLib.dll все заработало т.е база мигрировала. 3 rack я постав 1.0.1 вместо 1.1.0 потомучто с 1.1.0 и 2.0.0 тоже была проблема во время мегрирования базы(rake db:migrate) rack(1.1.0 not ~> 1.0.1) (Gem::LoadError) 4. Возникла проблема на этапе сборки gem install win32-service --platform=mswin3 Fetching: win32-api-1.4.8.gem (100%) ERROR: Error installing win32-service: The 'win32-api' native gem requires installed build tools. Please update your PATH to include build tools or download the DevK from 'http://rubyinstaller.org/downloads' and follow the instructio at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit' так что пришлось поставить и его версия DevKit-tdm-32-4.5.1-20101214-1400 На всякий случай лист того что установлено: C:\Ruby187\apps\redmine>gem list *** LOCAL GEMS *** actionmailer (2.3.11) actionpack (2.3.11) activerecord (2.3.11) activeresource (2.3.11) activesupport (2.3.11) cgi_multipart_eof_fix (2.5.0) gem_plugin (0.2.3) i18n (0.4.2) mongrel (1.1.5 x86-mingw32) mongrel_service (0.4.0) mysql (2.8.1 x86-mingw32) rack (1.0.1) rails (2.3.11) rake (0.8.7) rdiscount (1.6.8) win32-api (1.4.8) win32-service (0.7.1 x86-mswin32-60) windows-api (0.4.0) windows-pr (1.1.3) Итого сейчас прекрасно работает если запускать командой ruby script/server webrick -e production Но не работает если запускать как сервис В логах: Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with production environment... C:/Ruby187/apps/redmine/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:10: superclass mismatch for class GemDependency (TypeError) from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require' from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require' from C:/Ruby187/apps/redmine/config/../vendor/rails/railties/lib/initializer.rb:10 from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require' from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require' from C:/Ruby187/apps/redmine/config/boot.rb:45:in `load_initializer' from C:/Ruby187/apps/redmine/config/boot.rb:38:in `run' from C:/Ruby187/apps/redmine/config/boot.rb:11:in `boot!' from C:/Ruby187/apps/redmine/config/boot.rb:122 from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require' from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require' from C:/Ruby187/apps/redmine/config/environment.rb:20 from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require' from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/../lib/mongrel/rails.rb:147:in `rails' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/mongrel_rails:113:in `cloaker_' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/../lib/mongrel/configurator.rb:149:in `call' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/../lib/mongrel/configurator.rb:149:in `listener' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/mongrel_rails:99:in `cloaker_' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/../lib/mongrel/configurator.rb:50:in `call' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/../lib/mongrel/configurator.rb:50:in `initialize' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/mongrel_rails:84:in `new' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/mongrel_rails:84:in `run' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/../lib/mongrel/command.rb:212:in `run' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/mongrel_rails:281 from C:/Ruby187/bin/mongrel_rails:19:in `load' from C:/Ruby187/bin/mongrel_rails:19 ЗЫ помогите пока я чиню бубен =) |
Сообщ.
#2
,
|
|
|
Выложи свой environment.rb.
Как ты ставил гемы и mingw? Судя по всему что-то не то с монгрелом. Честно говоря я думаю ты избрал весьма проблемный путь - ставить редмайн на винду да и еще на 64-битную. Я работал на винде с руби всего месяц и монгрел у меня не работал - это я помню точно. Монгрел я использую для дева, а приложения пускаю через пассажир. Поищи пути пустить рельсу через пассажир на винде. |
Сообщ.
#3
,
|
|
|
Цитата Мохнатый @ еще на 64-битную. ну не знаю я вроде нигде не ничего не указаывал специально для поддержки для 64 бит, просто так указал. А что могут быть проблемы? Цитата Мохнатый @ Как ты ставил гемы и mingw? использовал gem из командной строки типа gem install а он сам собирал через DevKit это мое предположение. Так как девкит потредовался только когда гем gem install win32-service --platform=mswin32 ставил. Цитата Мохнатый @ Судя по всему что-то не то с монгрелом. Да у меня тоже такое предположение. Цитата Мохнатый @ Честно говоря я думаю ты избрал весьма проблемный путь - ставить редмайн на винду Ну как бы у других работает =) А какие еще пути есть? Я в руби не очень для меня это темный лес. Цитата Мохнатый @ Я работал на винде с руби всего месяц и монгрел у меня не работал - это я помню точно. Монгрел я использую для дева, а приложения пускаю через пассажир. Поищи пути пустить рельсу через пассажир на винде. Да печаль. А что такое пассажир? Цитата Мохнатый @ Выложи свой environment.rb. Выложил из папки C:\Ruby187\apps\redmine\config\environment.rb Добавлено файл # Be sure to restart your web server when you modify this file. # Uncomment below to force Rails into production mode when # you don't control web/app server and can't set it the proper way # ENV['RAILS_ENV'] ||= 'production' # Specifies gem version of Rails to use when vendor/rails is not present RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION if Gem::VERSION >= "1.3.6" module Rails class GemDependency def requirement r = super (r == Gem::Requirement.default) ? nil : r end end end end # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') # 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 ) # Force all environments to use the same logger level # (by default production uses :info, the others :debug) # config.log_level = :debug # Enable page/fragment caching by setting a file-based store # (remember to create the caching directory and make it readable to the application) # config.action_controller.cache_store = :file_store, "#{RAILS_ROOT}/tmp/cache" # Activate observers that should always be running # config.active_record.observers = :cacher, :garbage_collector config.active_record.observers = :message_observer, :issue_observer, :journal_observer, :news_observer, :document_observer, :wiki_content_observer # Make Active Record use UTC-base instead of local time # config.active_record.default_timezone = :utc # Use Active Record's schema dumper instead of SQL when creating the test database # (enables use of different database adapters for development and test environments) # config.active_record.schema_format = :ruby # Deliveries are disabled by default. Do NOT modify this section. # Define your email configuration in email.yml instead. # It will automatically turn deliveries on config.action_mailer.perform_deliveries = false config.gem 'rubytree', :lib => 'tree' config.gem 'coderay', :version => '~>0.9.7' # Load any local configuration that is kept out of source control # (e.g. gems, patches). if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb')) instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb')) end end Добавлено Я его не менял |
Сообщ.
#4
,
|
|
|
Цитата like-nix @ ну не знаю я вроде нигде не ничего не указаывал специально для поддержки для 64 бит, просто так указал. А что могут быть проблемы? Могут. Цитата like-nix @ Ну как бы у других работает =) А какие еще пути есть? Я в руби не очень для меня это темный лес. Поставить линукс-сервер и запустить там все ограничиваясь минимальным набором действий. Из тех, кто пытался натянуть рельсу на винду, все в основном настраивали апач. Цитата like-nix @ Да печаль. А что такое пассажир? Модуль, который позволяет пускать рельсу через апач. http://www.modrails.com/ Судя по энвайрменту редмайн патчит класс GemDependency и базовый класс у тебя отличается, отсюда и вылетает ошибка. Закомментируй эту ерунду в environment.rb и попробуй перезапустить. Добавлено А и раскомменти вот эту: ENV['RAILS_ENV'] ||= 'production' |
Сообщ.
#5
,
|
|
|
В логах теперь другая ошибка
лог C:/Ruby187/apps/redmine/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:in `requirement': undefined local variable or method `version_requirements' for #<Rails::GemDependency:0x53fb590> (NameError) from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:254:in `activate' from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:1204:in `gem' from C:/Ruby187/apps/redmine/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:73:in `add_load_paths' from C:/Ruby187/apps/redmine/config/../vendor/rails/railties/lib/initializer.rb:301:in `add_gem_load_paths' from C:/Ruby187/apps/redmine/config/../vendor/rails/railties/lib/initializer.rb:301:in `each' from C:/Ruby187/apps/redmine/config/../vendor/rails/railties/lib/initializer.rb:301:in `add_gem_load_paths' from C:/Ruby187/apps/redmine/config/../vendor/rails/railties/lib/initializer.rb:132:in `process' from C:/Ruby187/apps/redmine/config/../vendor/rails/railties/lib/initializer.rb:113:in `send' from C:/Ruby187/apps/redmine/config/../vendor/rails/railties/lib/initializer.rb:113:in `run' from C:/Ruby187/apps/redmine/config/environment.rb:20 from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require' from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/../lib/mongrel/rails.rb:147:in `rails' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/mongrel_rails:113:in `cloaker_' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/../lib/mongrel/configurator.rb:149:in `call' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/../lib/mongrel/configurator.rb:149:in `listener' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/mongrel_rails:99:in `cloaker_' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/../lib/mongrel/configurator.rb:50:in `call' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/../lib/mongrel/configurator.rb:50:in `initialize' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/mongrel_rails:84:in `new' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/mongrel_rails:84:in `run' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/../lib/mongrel/command.rb:212:in `run' from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/mongrel_rails:281 from C:/Ruby187/bin/mongrel_rails:19:in `load' from C:/Ruby187/bin/mongrel_rails:19 Цитата Мохнатый @ Судя по энвайрменту редмайн патчит класс GemDependency и базовый класс у тебя отличается, отсюда и вылетает ошибка. Закомментируй эту ерунду в environment.rb и попробуй перезапустить. Согласен что нужно искать в этом направлении. |
Сообщ.
#6
,
|
|
|
Посмотрел для интереса конфиги редмайна, который у меня крутится - ничего похожего на твой код в environment.rb я не нашел.
|
Сообщ.
#7
,
|
|
|
Кинь свои можно в личку.
|
Сообщ.
#8
,
|
|
|
Это мой environment.rb. Версия редмайна 0.9.
environment.rb # Be sure to restart your web server when you modify this file. # Uncomment below to force Rails into production mode when # you don't control web/app server and can't set it the proper way # ENV['RAILS_ENV'] ||= 'production' # Specifies gem version of Rails to use when vendor/rails is not present RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') # 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 ) # Force all environments to use the same logger level # (by default production uses :info, the others :debug) # config.log_level = :debug # Enable page/fragment caching by setting a file-based store # (remember to create the caching directory and make it readable to the application) # config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/cache" config.action_controller.session = {:key=>"_redmine_application",:secret=>"1239876uishfi39p284ujpadfjpquiwery10o8723yhofikewjhfaipluidepoifjas"} # Activate observers that should always be running # config.active_record.observers = :cacher, :garbage_collector config.active_record.observers = :message_observer, :issue_observer, :journal_observer, :news_observer, :document_observer, :wiki_content_observer # Make Active Record use UTC-base instead of local time # config.active_record.default_timezone = :utc # Use Active Record's schema dumper instead of SQL when creating the test database # (enables use of different database adapters for development and test environments) # config.active_record.schema_format = :ruby # Deliveries are disabled by default. Do NOT modify this section. # Define your email configuration in email.yml instead. # It will automatically turn deliveries on config.action_mailer.perform_deliveries = false config.action_mailer.raise_delivery_errors = true config.gem 'rubytree', :lib => 'tree' config.gem 'delayed_job', :version => '~>2.0.4' # Load any local configuration that is kept out of source control # (e.g. gems, patches). if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb')) instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb')) end end Остальные конфиги должны быть одинаковы и не должны иметь значения в данной ситуации. |