2016-09-15 12 views
2

내 우분투 컴퓨터에 jruby 1.7.16 및 레일 4.1.8을 설치했습니다. 나는 웹 브릭 서버를 사용하여 실행하고 싶은 기존의 jruby 애플리케이션을 가지고 있지만 실행할 수는 없다. 언제든지 명령 줄을 사용하여 서버를 시작할 수 있습니다. 오류가 발생했습니다.Jruby : 레일 응용 프로그램에서 jruby에서 webrick 서버를 시작할 수 없습니다.

successful load of fcntl 
Bundler::GemRequireError: There was an error while trying to load the gem 'activerecord-jdbc-adapter'. 
Gem Load Error is: private method `require' called for Kernel:Module 
Backtrace for gem load error is: 
/home/administrator/.rvm/gems/[email protected]/gems/bundler-1.13.1/lib/bundler/runtime.rb:91:in `require' 
org/jruby/RubyArray.java:1613:in `each' 
/home/administrator/.rvm/gems/[email protected]/gems/bundler-1.13.1/lib/bundler/runtime.rb:86:in `require' 
org/jruby/RubyArray.java:1613:in `each' 
/home/administrator/.rvm/gems/[email protected]/gems/bundler-1.13.1/lib/bundler/runtime.rb:75:in `require' 
/home/administrator/.rvm/gems/[email protected]/gems/bundler-1.13.1/lib/bundler.rb:106:in `require' 
/home/administrator/Desktop/vitality_iq_project/analytics-core/config/application.rb:19:in `(root)' 
org/jruby/RubyKernel.java:1065:in `require' 
/home/administrator/.rvm/gems/[email protected]/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:1:in `(root)' 
org/jruby/RubyKernel.java:1880:in `tap' 
/home/administrator/.rvm/gems/[email protected]/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:79:in `server' 
/home/administrator/.rvm/gems/[email protected]/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in `server' 
/home/administrator/.rvm/gems/[email protected]/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:40:in `run_command!' 
org/jruby/RubyKernel.java:1065:in `require' 
script/rails:6:in `(root)' 
Bundler Error Backtrace: 

     require at /home/administrator/.rvm/gems/[email protected]/gems/bundler-1.13.1/lib/bundler/runtime.rb:95 
      each at org/jruby/RubyArray.java:1613 
     require at /home/administrator/.rvm/gems/[email protected]/gems/bundler-1.13.1/lib/bundler/runtime.rb:86 
      each at org/jruby/RubyArray.java:1613 
     require at /home/administrator/.rvm/gems/[email protected]/gems/bundler-1.13.1/lib/bundler/runtime.rb:75 
     require at /home/administrator/.rvm/gems/[email protected]/gems/bundler-1.13.1/lib/bundler.rb:106 
     (root) at /home/administrator/Desktop/vitality_iq_project/analytics-core/config/application.rb:19 
     require at org/jruby/RubyKernel.java:1065 
     (root) at /home/administrator/.rvm/gems/[email protected]/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:1 
      tap at org/jruby/RubyKernel.java:1880 
     server at /home/administrator/.rvm/gems/[email protected]/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:79 
     server at /home/administrator/.rvm/gems/[email protected]/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76 
    run_command! at /home/administrator/.rvm/gems/[email protected]/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:40 
     require at org/jruby/RubyKernel.java:1065 
     (root) at script/rails:6 

다음은 내 JRuby에서 버전 정보

jruby -v 
jruby 1.7.16 (1.9.3p392) 2014-09-25 575b395 on Java HotSpot(TM) 64-Bit Server VM 1.8.0_101-b13 +jit [linux-amd64] 

하고 내 레일 버전은 4.1.8이다. Jruby 응용 프로그램에서 레일을 사용하여 서버를 시작하도록 도와주십시오.

감사합니다,

답변

1

이 원인이 Bundler를 1.13.1에 문제가있다는 - JRuby를 1.7에서 가시성 버그 따라서 개인 Kernel::require을 기울이고 있으나, 기본적으로 그들은 require 방법을 이식.

3 일 당신이 할 수 있습니다 : (Bundler를로드 한 후)

  1. 변화 Kernel.require 가시성이 공개하는
  2. 다운 그레이드를 Bundler 프로그램에 1.12
  3. 업그레이드를 JRuby를 1.7.26에 (아직 공개되지)
+0

Kares .. 당신이 내 목숨을 구해 주셨습니다 ..... 당신 덕분에 1000 .... 사랑합니다. –