powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Программирование [игнор отключен] [закрыт для гостей] / Ruby - активировать более старую версию gem'а
3 сообщений из 3, страница 1 из 1
Ruby - активировать более старую версию gem'а
    #37631736
BPK
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Я поставил новую версию rake - 0.9.2.2 при помощи jruby -S gem install. Теперь приложение не выполняет команду rake - пишет:

rake aborted!
You have already activated rake 0.9.2.2, but your Gemfile requires rake 0.9.2. Consider using bundle exec.

Подскажите, пожалуйста, ответ по КАЖДОМУ из вопросов:
1. Удалился ли gem предыдущей версии (0.9.2)? Как посмотреть?
2. Как удалить самую свежую версию rake, чтобы стала активной 0.9.2 ?
3. Как сделать активной версию 0.9.2, не удаляя последнюю?
4. Как заставить приложение пользоваться версией 0.9.2 несмотря на то, что наряду с 0.9.2 установлена другая версия (другие версии) ?
...
Рейтинг: 0 / 0
Ruby - активировать более старую версию gem'а
    #37631763
Фотография arni
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
>Удалился ли gem предыдущей версии (0.9.2)? Как посмотреть?
gem list

>Как удалить самую свежую версию rake, чтобы стала активной 0.9.2 ?
sudo gem uninstall rake
далее система предложит выбрать какую именно из версий удалять

p.s. может просто настроить rake в gemfile на текущую версию пакета, чем бороться с новой?
...
Рейтинг: 0 / 0
Ruby - активировать более старую версию gem'а
    #37631782
BPK
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
arni>Удалился ли gem предыдущей версии (0.9.2)? Как посмотреть?
gem list

>Как удалить самую свежую версию rake, чтобы стала активной 0.9.2 ?
sudo gem uninstall rake
далее система предложит выбрать какую именно из версий удалять

p.s. может просто настроить rake в gemfile на текущую версию пакета, чем бороться с новой?
Там начинается другой геморрой, так что вернул как было.

Исходная проблема в том, что мне не удаётся выполнить rake test.
Выдаёт:
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
JRuby limited openssl loaded.  http://jruby.org/openssl 
gem install jruby-openssl for full support.
rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
WARNING: Global access to Rake DSL methods is deprecated.  Please include
    ...  Rake::DSL into classes and modules which use the Rake DSL methods.
WARNING: DSL method TrainerWeb::Application#task called at C:/Program Files/jruby-1.6.4/lib/ruby/gems/1.8/gems/railties-
3.0.4/lib/rails/application.rb:214:in `initialize_tasks'
DEPRECATION WARNING: Rake tasks in D:/Work/P/Documents/NetBeansProjects/trainer-web/vendor/plugins/restful-authenticatio
n/tasks/auth.rake are deprecated. Use lib/tasks instead. (called from (root) at D:/Work/P/Documents/NetBeansProjects/tra
iner-web/Rakefile:13)
LoadError: no such file to load -- rake
  require at org/jruby/RubyKernel.java:1038
   (root) at C:/Program Files/jruby-1.6.4/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/rake_test_loader.rb:1
LoadError: no such file to load -- rake
  require at org/jruby/RubyKernel.java:1038
   (root) at C:/Program Files/jruby-1.6.4/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/rake_test_loader.rb:1
LoadError: no such file to load -- rake
  require at org/jruby/RubyKernel.java:1038
   (root) at C:/Program Files/jruby-1.6.4/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/rake_test_loader.rb:1
Errors running test:units, test:functionals, test:integration!

Если в irb сделать require 'rake', выдаёт:

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
irb(main):001:0> require 'rake'
LoadError: no such file to load -- rake
        from org/jruby/RubyKernel.java:1038:in `require'
        from (irb):1:in `evaluate'
        from org/jruby/RubyKernel.java:1088:in `eval'
        from C:/Program Files/jruby-1.6.4/lib/ruby/1.8/irb.rb:158:in `eval_input
'
        from C:/Program Files/jruby-1.6.4/lib/ruby/1.8/irb.rb:271:in `signal_sta
tus'
        from C:/Program Files/jruby-1.6.4/lib/ruby/1.8/irb.rb:155:in `eval_input
'
        from org/jruby/RubyKernel.java:1419:in `loop'
        from org/jruby/RubyKernel.java:1191:in `catch'
        from C:/Program Files/jruby-1.6.4/lib/ruby/1.8/irb.rb:154:in `eval_input
'
        from C:/Program Files/jruby-1.6.4/lib/ruby/1.8/irb.rb:71:in `start'
        from org/jruby/RubyKernel.java:1191:in `catch'
        from C:/Program Files/jruby-1.6.4/lib/ruby/1.8/irb.rb:70:in `start'
        from C:\Program Files\jruby-1.6.4\bin\irb:13:in `(root)'

В интернете я не нашёл ни одного действенного решения, как просто ВЗЯТЬ и СДЕЛАТЬ.

В Gemfile ЕСТЬ ссылка на rake.

В довершение ко всему, при попытке выполнить тесты из NetBeans (у меня JRuby под Windows), получаю:

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
Test-unit version : 2.4.5 loaded
JRuby limited openssl loaded.  http://jruby.org/openssl 
gem install jruby-openssl for full support.
rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
WARNING: Global access to Rake DSL methods is deprecated.  Please include
    ...  Rake::DSL into classes and modules which use the Rake DSL methods.
WARNING: DSL method TrainerWeb::Application#task called at C:/Program Files/jruby-1.6.4/lib/ruby/gems/1.8/gems/railties-3.0.4/lib/rails/application.rb:214:in `initialize_tasks'
DEPRECATION WARNING: Rake tasks in D:/Work/P/Documents/NetBeansProjects/trainer-web/vendor/plugins/restful-authentication/tasks/auth.rake are deprecated. Use lib/tasks instead. (called from (root) at D:/Work/P/Documents/NetBeansProjects/trainer-web/Rakefile:13)
'"C:/Program Files/jruby-1.6.4/bin/jruby.bat.exe"' is not recognized as an internal or external command,
operable program or batch file.
'"C:/Program Files/jruby-1.6.4/bin/jruby.bat.exe"' is not recognized as an internal or external command,
operable program or batch file.
'"C:/Program Files/jruby-1.6.4/bin/jruby.bat.exe"' is not recognized as an internal or external command,
operable program or batch file.
Errors running test:units, test:functionals, test:integration!

Finished in 0.0 seconds.
0 tests, 0 failures, 0 errors

Эта же проблема встречается на другой машине, на которой JRuby был поставлен примерно в то же самое время. Версия JRuby 1.6.4.

Я уже не знаю что делать. Запас решений исчерпан.
...
Рейтинг: 0 / 0
3 сообщений из 3, страница 1 из 1
Форумы / Программирование [игнор отключен] [закрыт для гостей] / Ruby - активировать более старую версию gem'а
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]