Re: [jruby-user] JRuby: gem install paths not working compared to Ruby
Christian MICHON <[email protected]> Mon, 5 Jan 2015 06:50:24 +0100
| Newsgroups | gmane.comp.lang.jruby.user |
|---|---|
| Message-ID | <CACx2yF9yj0cSaPeqasNW+VpHQE+fcbN=XgzHgqGaVkMWeX21FQ@mail.gmail.com> |
Remove first standard ruby from your path, or use bundler. Installing gems always worked using jgem or "jruby -S gem ..." On Jan 5, 2015 4:51 AM, "Johan Wasserman" <[email protected]> wrote: > HI. I'm running rvm on Cygwin and find the way the paths are used when > installing gems differ between Ruby and JRuby. I am unable to install > gems under JRuby. Any workarounds or fixes would be highly appreciated. > > When installing a gem (rails for example) on Ruby (2.2.0) everything > works fine, while trying to install the same gem (rails) on JRuby > (1.7.18 | 1.6.8) I get the error: No such file or directory - > C:\Johan_Wasserman.rvm\gems\jruby-1.7.18\gems\i18n-0.7.0 > > I have researched (Googled) this and it seems to be a general problem > that remains unanswered, except for one suggestion to change the > GEM_HOME and GEM_PATH env vars to include the full path, ie: > GEM_HOME="C:/Zones/Programs/xnix/cygwin64/home/Johan > Wasserman/Johan_Wasserman.rvm/gems/jruby-1.7.18" > > This works during the install but when I try to run rails (rails > --version) directly after the install I get: bash: rails: command not > found, both with the modified and the original paths for GEM_HOME and > GEM_PATH. > > Note that I have implemented the workaround for using spaces in my path > names by adding export rvm_path=/Johan_Wasserman.rvm to .rvmrc, which > works. I don't feel that the workaround works and the spaces are > irrelevant since the same error occurs in other environments where there > are no spaces in the home paths. > > Below is the errors I'm getting with JRuby (please consider that these > errors do not appear with Ruby although the paths look pretty much the > same for both environments), my rvm info for Ruby and JRuby, as well as > my gem env under JRuby: > > gem install rails > ERROR: While executing gem ... (Errno::ENOENT) > No such file or directory - > C:\Johan_Wasserman.rvm\gems\jruby-1.7.18\gems\i18n-0.7.0 > > jruby -S gem install rails > ERROR: While executing gem ... (Errno::ENOENT) > No such file or directory - > C:\Johan_Wasserman.rvm\gems\jruby-1.7.18\gems\i18n-0.7.0 > > which gem > /Johan_Wasserman.rvm/rubies/jruby-1.7.18/bin/gem > > gem install bundler > Fetching: bundler-1.7.11.gem (100%) > ERROR: While executing gem ... (Errno::ENOENT) > No such file or directory - > C:\Johan_Wasserman.rvm\gems\jruby-1.7.18\gems\bundler-1.7.11 > > ruby-2.2.0: > > system: > uname: "CYGWIN_NT-6.1 HP-PC 1.7.33-2(0.280/5/3) 2014-11-13 > 15:47 x86_64 Cygwin" > system: "cygwin/unknown/x86_64" > bash: "/usr/bin/bash => GNU bash, version 4.1.17(9)-release > (x86_64-unknown-cygwin)" > zsh: " => not installed" > > rvm: > version: "rvm 1.26.8 (latest) by Wayne E. Seguin > <[email protected]>, Michal Papis <[email protected]> > [https://rvm.io/]" > updated: "2 hours 43 minutes 50 seconds ago" > path: "/Johan_Wasserman.rvm" > > ruby: > interpreter: "ruby" > version: "2.2.0p0" > date: "2014-12-25" > platform: "x86_64-cygwin" > patchlevel: "2014-12-25 revision 49005" > full_version: "ruby 2.2.0p0 (2014-12-25 revision 49005) > [x86_64-cygwin]" > > homes: > gem: "/Johan_Wasserman.rvm/gems/ruby-2.2.0" > ruby: "/Johan_Wasserman.rvm/rubies/ruby-2.2.0" > > binaries: > ruby: "/Johan_Wasserman.rvm/rubies/ruby-2.2.0/bin/ruby" > irb: "/Johan_Wasserman.rvm/rubies/ruby-2.2.0/bin/irb" > gem: "/Johan_Wasserman.rvm/rubies/ruby-2.2.0/bin/gem" > rake: "/Johan_Wasserman.rvm/rubies/ruby-2.2.0/bin/rake" > > environment: > PATH: > > "/Johan_Wasserman.rvm/gems/ruby-2.2.0/bin:/Johan_Wasserman.rvm/gems/ruby-2.2.0@global > /bin:/Johan_Wasserman.rvm/rubies/ruby-2.2.0/bin:/Johan_Wasserman.rvm/bin:/ > > > jruby-1.7.18: > > system: > uname: "CYGWIN_NT-6.1 HP-PC 1.7.33-2(0.280/5/3) 2014-11-13 > 15:47 x86_64 Cygwin" > system: "cygwin/unknown/x86_64" > bash: "/usr/bin/bash => GNU bash, version 4.1.17(9)-release > (x86_64-unknown-cygwin)" > zsh: " => not installed" > > rvm: > version: "rvm 1.26.8 (latest) by Wayne E. Seguin > <[email protected]>, Michal Papis <[email protected]> > [https://rvm.io/]" > updated: "2 hours 47 minutes 50 seconds ago" > path: "/Johan_Wasserman.rvm" > > ruby: > interpreter: "jruby" > version: "1.7.18" > " date: "jruby 1.7.18 (1.9.3p551) 2014-12-22 625381c on Java > HotSpot(TM) 64-Bit Server VM 1.8.0_25-b18 +jit [Windows 7-amd64] > platform: "Windows 7-amd64" > patchlevel: "TM" > " full_version: "jruby 1.7.18 (1.9.3p551) 2014-12-22 625381c on Java > HotSpot(TM) 64-Bit Server VM 1.8.0_25-b18 +jit [Windows 7-amd64] > > homes: > gem: "/Johan_Wasserman.rvm/gems/jruby-1.7.18" > ruby: "/Johan_Wasserman.rvm/rubies/jruby-1.7.18" > > binaries: > ruby: "/Johan_Wasserman.rvm/rubies/jruby-1.7.18/bin/ruby" > irb: "/Johan_Wasserman.rvm/rubies/jruby-1.7.18/bin/irb" > gem: "/Johan_Wasserman.rvm/rubies/jruby-1.7.18/bin/gem" > rake: "/Johan_Wasserman.rvm/rubies/jruby-1.7.18/bin/rake" > > environment: > PATH: > > "/Johan_Wasserman.rvm/gems/jruby-1.7.18/bin:/Johan_Wasserman.rvm/gems/jruby-1.7.18@global > /bin:/Johan_Wasserman.rvm/rubies/jruby-1.7.18/bin:/Johan_Wasserman.rvm > /Program Files (x86)/Java/jre1.8.0_25/bin/client:/cygdrive/c/Program > Files (x86)/Java/jre1.8.0_25/bin:/cygdrive/c/Program Files > (x86)/Java/jre1.8.0_25/lib/i386:/cygdrive/c/Progr > > Zones/Programs/Java/jre1.8.0_20/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdr > gdrive/c/Users/Johan Wasserman/AppData/Roaming/npm:/cygdrive/c/Program > Files/Boot2Docker for Windows:/cygdrive/c/Zones/Develoment/Aptana Studio > 3 Workspace:/usr/lib/lapack" > GEM_HOME: "/Johan_Wasserman.rvm/gems/jruby-1.7.18" > GEM_PATH: > > "/Johan_Wasserman.rvm/gems/jruby-1.7.18:/Johan_Wasserman.rvm/gems/jruby-1.7.18@global > " > MY_RUBY_HOME: "/Johan_Wasserman.rvm/rubies/jruby-1.7.18" > IRBRC: "/Johan_Wasserman.rvm/rubies/jruby-1.7.18/.irbrc" > RUBYOPT: "" > gemset: "" > > > RubyGems Environment: > - RUBYGEMS VERSION: 2.1.9 > - RUBY VERSION: 1.9.3 (2014-12-22 patchlevel 551) [java] > - INSTALLATION DIRECTORY: /Johan_Wasserman.rvm/gems/jruby-1.7.18 > - RUBY EXECUTABLE: > > C:/Zones/Programs/xnix/cygwin64/Johan_Wasserman.rvm/rubies/jruby-1.7.18/bin/jruby.exe > - EXECUTABLE DIRECTORY: /Johan_Wasserman.rvm/gems/jruby-1.7.18/bin > - SPEC CACHE DIRECTORY: C:/Zones/Programs/xnix/cygwin64/home/Johan > Wasserman/.gem/specs > - RUBYGEMS PLATFORMS: > - ruby > - universal-java-1.8 > - GEM PATHS: > - /Johan_Wasserman.rvm/gems/jruby-1.7.18 > - > > /Johan_Wasserman.rvm/gems/jruby-1.7.18:/Johan_Wasserman.rvm/gems/jruby-1.7.18@global > - 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/ > - SHELL PATH: > - > C:\Zones\Programs\xnix\cygwin64\Johan_Wasserman.rvm\gems\jruby-1.7.18\bin > - > > C:\Zones\Programs\xnix\cygwin64\Johan_Wasserman.rvm\rubies\jruby-1.7.18\lib\ruby\gems\shared\bin > - > C:\Zones\Programs\xnix\cygwin64\Johan_Wasserman.rvm\rubies\jruby-1.7.18\bin > - C:\Zones\Programs\xnix\cygwin64\Johan_Wasserman.rvm\bin > - C:\Zones\Programs\xnix\cygwin64\usr\local\bin > - C:\Zones\Programs\xnix\cygwin64\bin > - C:\Program Files (x86)\Java\jre1.8.0_25\bin\client > - C:\Program Files (x86)\Java\jre1.8.0_25\bin > - C:\Program Files (x86)\Java\jre1.8.0_25\lib\i386 > - C:\ProgramData\Oracle\Java\javapath > - C:\Zones\Programs\Java\jre1.8.0_20\bin > - C:\Windows\system32 > - C:\Windows > - C:\Windows\System32\Wbem > - C:\Windows\System32\WindowsPowerShell\v1.0 > - C:\Zones\Programs\nodejs > - C:\Zones\Programs\xnix\cygwin64\bin > - C:\Users\Johan Wasserman\AppData\Roaming\npm > - C:\Program Files\Boot2Docker for Windows > - C:\Zones\Develoment\Aptana Studio 3 Workspace > - C:\Zones\Programs\xnix\cygwin64\lib\lapack > > -- > Posted via http://www.ruby-forum.com/. > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > >