Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gem Load Error -- Cannot Find Installed Gem #159

Open
kingbari opened this issue Jun 19, 2013 · 7 comments
Open

Gem Load Error -- Cannot Find Installed Gem #159

kingbari opened this issue Jun 19, 2013 · 7 comments

Comments

@kingbari
Copy link

I installed JRuby on Cygwin as per the chruby v0.3.5 jruby installation guide.

I then installed jruby-lint via: jruby -S gem install jruby-lint and the gem executable was installed, as expected, at /cygdrive/c/Cygwin/home/Ari/.gem/jruby/1.9.3/bin/jrlint. However, when I run jrlint, I get the error:

Gem::LoadError: Could not find 'jruby-lint' (>= 0) among 0 total gem(s) to_specs at C:/Cygwin/opt/rubies/jruby-1.7.4/lib/ruby/shared/rubygems/dependency.rb:296 to_spec at C:/Cygwin/opt/rubies/jruby-1.7.4/lib/ruby/shared/rubygems/dependency.rb:307 gem at C:/Cygwin/opt/rubies/jruby-1.7.4/lib/ruby/shared/rubygems/core_ext/kernel_gem.rb:47 (root) at C:\Cygwin\home\Ari.gem\jruby\1.9.3\bin\jrlint:22

If I include the full path to the executable, it runs.

I've checked the $PATH variable and it does include the jruby bin directory: /cygdrive/c/Cygwin/home/Ari/.gem/jruby/1.9.3/bin

Appreciate thoughts/insights on this matter.

@postmodern
Copy link
Owner

Could you post your gem env?

@kingbari
Copy link
Author

Home Env: export HOME="C:/Cygwin/home/$USER"

Gem Env:

RubyGems Environment:                                                                               
  - RUBYGEMS VERSION: 2.0.3                                                                         
  - RUBY VERSION: 1.9.3 (2013-05-16 patchlevel 392) [java]                                          
  - INSTALLATION DIRECTORY: C:/Cygwin/home/Ari/.gem/jruby/1.9.3                                    
  - RUBY EXECUTABLE: C:/Cygwin/opt/rubies/jruby-1.7.4/bin/jruby.exe                                 
  - EXECUTABLE DIRECTORY: C:/Cygwin/home/Ari/.gem/jruby/1.9.3/bin                                  
  - RUBYGEMS PLATFORMS:                                                                             
    - ruby                                                                                          
    - universal-java-1.7                                                                            
  - GEM PATHS:                                                                                      
     - C:/Cygwin/home/Ari/.gem/jruby/1.9.3                                                         
     - C:/Cygwin/home/Ari/.gem/jruby/1.9.3:C:/Cygwin/opt/rubies/jruby-1.7.4/lib/ruby/gems/shared   
  - 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:                                                                                 
     - https://rubygems.org/                                                                        

@postmodern
Copy link
Owner

Also what is your PATH? Maybe the wrong gem command is being invoked?

@kingbari
Copy link
Author

Path:

C:/Cygwin/home/Ari/.gem/jruby/1.9.3/bin:C:/Cygwin/opt/rubies/jruby-1.7.4/lib/ru
opt/rubies/jruby-1.7.4/bin:/usr/local/bin:/usr/bin:/bin:C:/Cygwin/home/Ari/bin 

@postmodern
Copy link
Owner

and what does gem which jruby-lint say vs. jruby -S gem which jruby-lint?

@kingbari
Copy link
Author

gem which jruby-lint and jruby -S gem which jruby-lint both return: ERROR: Can't find ruby library file or shared library jruby-lint

However, both gem list -l and jruby -S gem list -l include jruby-lint:

*** LOCAL GEMS ***
blankslate (2.1.2.4)
bouncy-castle-java (1.5.0147)
edn (1.0.0)
jruby-jars (1.7.4)

jruby-lint (0.4.1)

jruby-openssl (0.8.8)
jruby-rack (1.1.13.2)
mini_portile (0.5.0)
nokogiri (1.6.0 java)

@eregon
Copy link
Contributor

eregon commented Jul 26, 2013

The ":" in PATH are likely problematic, no? (both paths separator and drive/path separator)
HOME should probably be set to /cygdrive/c/Cygwin/home/Ari/.gem/jruby/1.9.3/bin or such.
(Actually, it is not set by default?)

And please paste type gem or which gem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants