Error after clean install on Windows

Hello,

I have a problem with my JRuby installation. I just installed JRuby
1.7.6 exe+jre(x64) on Windows 8 64-bit and tried to execute

“jruby -S gem list --local”

This gave me the following error message:

C:>jruby -S gem list --local
ERROR: Loading command: list (LoadError)
Could not load FFI Provider: (NotImplementedError) FFI not
available: null
See http://jira.codehaus.org/browse/JRUBY-4583
ERROR: While executing gem … (NoMethodError)
undefined method `invoke_with_build_args’ for nil:NilClass

If I type “jruby --version” i get the following output:

C:>jruby --version
jruby 1.7.6 (1.9.3p392) 2013-10-22 6004147 on Java HotSpot™ 64-Bit
Server VM
1.7.0_11-b21 [Windows 8-amd64]

which indicated to me that ruby and Java are installed correctly. I have
developed and run some Java applications on this computer so Java should
be fine.

Do anybody have an idea what might cause the problem?

After trying everything, including uninstalling java/jruby and
installing all possible combinations (32/64bit) it still produces the
same error.

I tried to install the latest JRuby on the servers in my Company and it
failed on all tested Machines (including one VM; we use Windows 8 x64
exclusively).

I have doubts to believe that the fact, that JRuby package is not
compatible with Windows 8 would be unknown for that period of time.

I would appreciate it if someone who has Windows 8 x64 could confirm
that JRuby actually works and it is a problem caused by some local
configurations of the it department.

As I just found out JRuby 1.6.8 works perfectly. This issue only occurs
in JRuby 1.7.6/1.7.8. So it seems to be a bug after all.

On Tue, Nov 19, 2013 at 1:05 PM, Max M. [email protected] wrote:

As I just found out JRuby 1.6.8 works perfectly. This issue only occurs
in JRuby 1.7.6/1.7.8. So it seems to be a bug after all.

Looks like it’s something on your system.

On my Win8.1 64-bit system I just tried a fresh install using this wacky
manual setup

  1. Extract oracle’s server jre to C:\Apps\jdk1.7.0_45
  2. Extract jruby 1.7.8 to C:\Apps\jruby
  3. Set non-PATH envars

C:>set j
JAVA_HOME=C:\Apps\jdk1.7.0_45\jre
JDK_HOME=C:\Apps\jdk1.7.0_45

  1. set PATH=%PATH%;C:\Apps\jruby\bin

…and these quicktests run with no errors:

C:>jruby -v -e “puts ‘Hello Win8.1 x86_64 from JRuby’”
jruby 1.7.8 (1.9.3p392) 2013-11-14 0ce429e on Java HotSpot™ 64-Bit
Server VM 1.7.0_45-b18 [Windows 8-amd64]
Hello Win8.1 x86_64 from JRuby

C:>jruby -S gem li

*** LOCAL GEMS ***

rake (10.1.0)

C:>jruby -S gem --version
2.1.9

C:>jruby -S gem li rubygems-update -r

*** REMOTE GEMS ***

rubygems-update (2.1.11)

Ok. I removed all Java versions and jruby from my computer and did
exactly the same. Here are the results:

C:>set j
JAVA_HOME=C:\Apps\jdk1.7.0_45\jre
JDK_HOME=C:\Apps\jdk1.7.0_45

C:>set path
Path=…;c:\Apps\jruby-1.7.8\bin;…

C:>jruby -v -e “puts ‘Hello Win8 x86_64 from JRuby’”
jruby 1.7.8 (1.9.3p392) 2013-11-14 0ce429e on Java HotSpot™ 64-Bit
Server VM
1.7.0_45-b18 [Windows 8-amd64]
Hello Win8 x86_64 from JRuby

C:>jruby -S gem li
ERROR: Loading command: list (LoadError)
Could not load FFI Provider: (NotImplementedError) FFI not
available: nu
ll
See http://jira.codehaus.org/browse/JRUBY-4583
ERROR: While executing gem … (NoMethodError)
undefined method `invoke_with_build_args’ for nil:NilClass

C:>jruby -S gem --version
2.1.9

C:>jruby -S gem li rubygems-update -r
ERROR: Loading command: list (LoadError)
Could not load FFI Provider: (NotImplementedError) FFI not
available: nu
ll
See http://jira.codehaus.org/browse/JRUBY-4583
ERROR: While executing gem … (NoMethodError)
undefined method `invoke_with_build_args’ for nil:NilClass

As can be clearly seen here I can access Java methods from JRuby:

C:>jruby -v -e “java.lang.System.out.println ‘Hello Win8 x86_64 from
JRuby’”
jruby 1.7.8 (1.9.3p392) 2013-11-14 0ce429e on Java HotSpot™ 64-Bit
Server VM
1.7.0_45-b18 [Windows 8-amd64]
Hello Win8 x86_64 from JRuby

As I have already mentioned these issues do not occur with JRuby 1.6.8.
Because of this I have some concerns to believe that the system is to
blame. Also I tested on some other Windows 8 computers and the error
remains. I will check if I can reproduce this error on a Win8.1 machine
as soon as I can get access to one.

Have you also removed all gems?

I deleted the JRuby folder and reinstalled it from jruby.org after every
attempt. I tried exe, exe(64), zip, exe+jre(64) and exe+jre. I also
installed it on different harddrives and my home folder to see if that
changes something. The machine I am currently on is used regularly for
java development and similar issues were never reported before.

On Tue, Nov 19, 2013 at 5:38 PM, Max M. [email protected] wrote:

I deleted the JRuby folder and reinstalled it from jruby.org after every
attempt. I tried exe, exe(64), zip, exe+jre(64) and exe+jre. I also
installed it on different harddrives and my home folder to see if that
changes something. The machine I am currently on is used regularly for
java development and similar issues were never reported before.

See if there’s anything odd in environment that’s confusing rubygems.
Maybe
an old GEM_HOME envar or similar?

Show the results of running both set and jruby -S gem env

On Tue, Nov 19, 2013 at 6:44 PM, Jon [email protected] wrote:

See if there’s anything odd in environment that’s confusing rubygems.
Maybe an old GEM_HOME envar or similar?

Show the results of running both set and jruby -S gem env

I’m reaching, but could an old .jrubyrc file be causing problems?

If you’ve got one in the normal location, show it’s contents as well

C:>cd %USERPROFILE% && type .jrubyrc

I tried to delete everything that could be related to ruby before
reinstalling it.

Here is the result of the commands:

C:>set
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users*\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=*****
ComSpec=C:\Windows\system32\cmd.exe
FP_NO_HOST_CHECK=NO
GNUPLOT_LIB=C:\Program Files (x86)\gnuplot\demo
GTK_BASEPATH=C:\Program Files (x86)\GtkSharp\2.12
HOMEDRIVE=C:
HOMEPATH=\Users*

JAVA_HOME=C:\Apps\jdk1.7.0_45\jre
JDK_HOME=C:\Apps\jdk1.7.0_45
LOCALAPPDATA=C:\Users*\AppData\Local
LOGONSERVER=\*****
M2_HOME=C:\Program Files\SpringSource\apache-maven-3.0.4
NUMBER_OF_PROCESSORS=6
OS=Windows_NT
Path=C:\Program Files\ImageMagick-6.8.6-Q16;C:\Program Files
(x86)\NVIDIA
Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program
Files\MiKTeX 2.9\miktex\bin\x64;C:\mingw32\bin;C:\Program Files
(x86)\CMake 2.8\bin;C:\mingw32\msys\bin;C:\Program
Files\SpringSource\apache-maven-3.0.4\bin;C:\Program Files\Microsoft SQL
Server\110\Tools\Binn;C:\Program Files
(x86)\GNU\GnuPG\pub;C:\mingw64\bin;C:\Program Files\nodejs;C:\Program
Files\MATLAB\R2012b\runtime\win64;C:\Program
Files\MATLAB\R2012b\bin;C:\Program Files (x86)\git\cmd;C:\Program Files
(x86)\mplayer;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files
(x86)\nasm;C:\Program Files (x86)\WinSCP;C:\Program
Files\TortoiseSVN\bin;C:\Program Files
(x86)\gnuplot\bin;c:\Apps\jruby-1.7.8\bin;C:\Users*
\AppData\Roaming\npm
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW;.RB;.RBW
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=AMD64 Family 16 Model 10 Stepping 0, AuthenticAMD
PROCESSOR_LEVEL=16
PROCESSOR_REVISION=0a00
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public
SAL_ACCESSIBILITY_ENABLED=1
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users*\AppData\Local\Temp
TMP=C:\Users*
\AppData\Local\Temp
USERDOMAIN=*****
USERDOMAIN_ROAMINGPROFILE=*****
USERNAME=*****
USERPROFILE=C:\Users*****
VBOX_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox
VS110COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio
11.0\Common7\Tools
VS90COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio
9.0\Common7\Tools
windir=C:\Windows

C:>jruby -S gem env
RubyGems Environment:

  • RUBYGEMS VERSION: 2.1.9
  • RUBY VERSION: 1.9.3 (2013-11-14 patchlevel 392) [java]
  • INSTALLATION DIRECTORY: c:/Apps/jruby-1.7.8/lib/ruby/gems/shared
  • RUBY EXECUTABLE: c:/Apps/jruby-1.7.8/bin/jruby.exe
  • EXECUTABLE DIRECTORY: c:/Apps/jruby-1.7.8/bin
  • SPEC CACHE DIRECTORY: C:/Users/*****/.gem/specs
  • RUBYGEMS PLATFORMS:
    • ruby
    • universal-java-1.7
  • GEM PATHS:
    • c:/Apps/jruby-1.7.8/lib/ruby/gems/shared
    • C:/Users/*****/.gem/jruby/1.9
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :backtrace => false
    • :bulk_threshold => 1000
    • “install” => “–no-rdoc --no-ri --env-shebang”
    • “update” => “–no-rdoc --no-ri --env-shebang”
  • REMOTE SOURCES:
  • SHELL PATH:
    • C:\Program Files\ImageMagick-6.8.6-Q16
    • C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
    • C:\Windows\system32
    • C:\Windows
    • C:\Windows\System32\Wbem
    • C:\Windows\System32\WindowsPowerShell\v1.0\
    • C:\Program Files\MiKTeX 2.9\miktex\bin\x64\
    • C:\mingw32\bin
    • C:\Program Files (x86)\CMake 2.8\bin
    • C:\mingw32\msys\bin
    • C:\Program Files\SpringSource\apache-maven-3.0.4\bin
    • C:\Program Files\Microsoft SQL Server\110\Tools\Binn\
    • C:\Program Files (x86)\GNU\GnuPG\pub
    • C:\mingw64\bin
    • C:\Program Files\nodejs\
    • C:\Program Files\MATLAB\R2012b\runtime\win64
    • C:\Program Files\MATLAB\R2012b\bin
    • C:\Program Files (x86)\git\cmd
    • C:\Program Files (x86)\mplayer
    • C:\Program Files (x86)\GtkSharp\2.12\bin
    • C:\Program Files (x86)\nasm
    • C:\Program Files (x86)\WinSCP\
    • C:\Program Files\TortoiseSVN\bin
    • C:\Program Files (x86)\gnuplot\bin
    • c:\Apps\jruby-1.7.8\bin
    • C:\Users*****\AppData\Roaming\npm

C:>cd %USERPROFILE% && type .jrubyrc
The system cannot find the file specified.

Delete the .gem folder in your home path. It might contain the ffi gem.

Have you installed jruby 9000 on this machine? I saw similar traces due
to
ffi.

On Nov 20, 2013 5:47 PM, “Max M.” [email protected] wrote:

CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
LOCALAPPDATA=C:\Users*****\AppData\Local
LOGONSERVER=\*****
M2_HOME=C:\Program Files\SpringSource\apache-maven-3.0.4
NUMBER_OF_PROCESSORS=6
OS=Windows_NT
Path=C:\Program Files\ImageMagick-6.8.6-Q16;C:\Program Files
(x86)\NVIDIA

Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program

(x86)\gnuplot\bin;c:\Apps\jruby-1.7.8\bin;C:\Users*****\AppData\Roaming\npm

PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW;.RB;.RBW

On Wed, Nov 20, 2013 at 11:47 AM, Max M. [email protected] wrote:

CommonProgramW6432=C:\Program Files\Common Files
LOGONSERVER=\*****
Server\110\Tools\Binn;C:\Program Files
PROCESSOR_ARCHITECTURE=AMD64
SAL_ACCESSIBILITY_ENABLED=1
VS110COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio

  • RUBY VERSION: 1.9.3 (2013-11-14 patchlevel 392) [java]
  • GEM CONFIGURATION:
    • C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
    • C:\Program Files (x86)\GNU\GnuPG\pub
    • C:\Program Files (x86)\gnuplot\bin
    • c:\Apps\jruby-1.7.8\bin
    • C:\Users*****\AppData\Roaming\npm

C:>cd %USERPROFILE% && type .jrubyrc
The system cannot find the file specified.

Odd. Nothing jumps out at me, but you have a lot of stuff on your
default
PATH

Let’s try a couple more things: (1) try a minimal path, and (2) see if
you’ve got anything in cmd.exe’s AutoRun setting.

First, set a minimal PATH and try things again. Here’s the environment
on
my machine that still appears to be working:

C:>set
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Apps\jruby\bin

C:>echo %PATH%
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Apps\jruby\bin

C:>jruby -S gem env
RubyGems Environment:

  • RUBYGEMS VERSION: 2.1.11
  • RUBY VERSION: 1.9.3 (2013-11-14 patchlevel 392) [java]
  • INSTALLATION DIRECTORY: C:/Apps/jruby/lib/ruby/gems/shared
  • RUBY EXECUTABLE: C:/Apps/jruby/bin/jruby.exe
  • EXECUTABLE DIRECTORY: C:/Apps/jruby/bin
  • SPEC CACHE DIRECTORY: C:/Users/Jon/.gem/specs
  • RUBYGEMS PLATFORMS:
    • ruby
    • universal-java-1.7
  • GEM PATHS:
    • C:/Apps/jruby/lib/ruby/gems/shared
    • C:/Users/Jon/.gem/jruby/1.9
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :backtrace => false
    • :bulk_threshold => 1000
    • “install” => “–no-rdoc --no-ri --env-shebang”
    • “update” => “–no-rdoc --no-ri --env-shebang”
    • “gem” => “–no-ri --no-rdoc”
  • REMOTE SOURCES:
  • SHELL PATH:
    • C:\WINDOWS\system32
    • C:\WINDOWS
    • C:\WINDOWS\System32\Wbem
    • C:\Apps\jruby\bin
    • .
    • .

C:\Users\Jon\Documents>set
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\Jon\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=BLACK
ComSpec=C:\WINDOWS\system32\cmd.exe
configsetroot=C:\WINDOWS\ConfigSetRoot
FP_NO_HOST_CHECK=NO
HOME=C:\Users\Jon
HOMEDRIVE=C:
HOMEPATH=\Users\Jon
JAVA_HOME=C:\Apps\jdk1.7.0_45\jre
JDK_HOME=C:\Apps\jdk1.7.0_45
LOCALAPPDATA=C:\Users\Jon\AppData\Local
LOGONSERVER=\BLACK
NUMBER_OF_PROCESSORS=8
OS=Windows_NT
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Apps\jruby\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=3a09
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public
READYAPPS=C:\ProgramData\Lenovo\ReadyApps
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\Users\Jon\AppData\Local\Temp
TMP=C:\Users\Jon\AppData\Local\Temp
TVT=C:\Program Files (x86)\Lenovo
USERDOMAIN=Black
USERDOMAIN_ROAMINGPROFILE=Black
USERNAME=Jon
USERPROFILE=C:\Users\Jon
VBOX_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox
VS110COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio
11.0\Common7\Tools
VS120COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio
12.0\Common7\Tools
windir=C:\WINDOWS

Lastly, see if your system has anything in the AutoRun registry setting
that may conflict. The following is from my system and shows there is no
AutoRun key. If you see an AutoRun key in your listing, delete it and
try
again as AutoRun tweaks have been known to cause various types of
problems
with gem installations and other things.

C:>reg query “HKLM\Software\Microsoft\Command Processor” /s

HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor
PathCompletionChar REG_DWORD 0x40
EnableExtensions REG_DWORD 0x1
CompletionChar REG_DWORD 0x40
DefaultColor REG_DWORD 0x0

C:>reg query “HKCU\Software\Microsoft\Command Processor” /s

HKEY_CURRENT_USER\Software\Microsoft\Command Processor
PathCompletionChar REG_DWORD 0x9
EnableExtensions REG_DWORD 0x1
CompletionChar REG_DWORD 0x9
DefaultColor REG_DWORD 0x0

Long story short: I backed up all important files and recreated the user
account on all machines where the error occurred. Now everything works.

It seems that something someone installed leaved a configuration that
causes problems with jruby 1.7. 1.6 worked without problems on all
machines.

I previously deleted the .gem folder and everything that could be
related to ruby configurations and the error still occurred.

Anyway thank you for all your help to this point.

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