Bug #3677
closedunable to run certain gem binaries' in windows 7
Description
=begin
Currently:
C:\installs\ruby_trunk_installed\bin>rake -T
C:/installs/ruby_trunk_installed/lib/ruby/1.9.1/rubygems.rb:340:in bin_path': can't find executable rake for rake-0.8.7 (Gem::Exception) from C:/installs/ruby_trunk_installed/bin/rake:19:in
'
The problem seems to not have existed with 1.9.2 preview 3. Also doesn't seem to be a problem on XP, which is rather odd.
The problem exists on 1.9.2 RC1, and on trunk (as noted here).
Thanks.
-r
=end
Updated by luislavena (Luis Lavena) almost 15 years ago
=begin
I can't reproduce:
C:\Users\Luis\Projects\oss\oci\rubyinstaller\sandbox\ruby19_mingw>ruby -v
ruby 1.9.3dev (2010-08-10 trunk 28955) [i386-mingw32]
C:\Users\Luis\Projects\oss\oci\rubyinstaller\sandbox\ruby19_mingw>gem list -d
*** LOCAL GEMS ***
minitest (1.6.0)
Author:
Installed at: C:/Users/Luis/Projects/oss/oci/rubyinstaller/sandbox/ruby19_mingw/lib/ruby/gems/1.9.1
This minitest is bundled with Ruby
rake (0.8.7)
Author:
Installed at: C:/Users/Luis/Projects/oss/oci/rubyinstaller/sandbox/ruby19_mingw/lib/ruby/gems/1.9.1
This rake is bundled with Ruby
rdoc (2.5.8)
Author:
Installed at: C:/Users/Luis/Projects/oss/oci/rubyinstaller/sandbox/ruby19_mingw/lib/ruby/gems/1.9.1
This rdoc is bundled with Ruby
C:\Users\Luis\Projects\oss\oci\rubyinstaller\sandbox\ruby19_mingw>rake --version
rake, version 0.8.7
===
Looking into bin/rake I see is not the gem based stub, but is the bin/rake found inside the gem.
After doing "gem install rake":
C:\Users\Luis\Projects\oss\oci\rubyinstaller\sandbox\ruby19_mingw>rake --version
C:/Users/Luis/Projects/oss/oci/rubyinstaller/sandbox/ruby19_mingw/lib/ruby/1.9.1/rubygems.rb:340:in bin_path': can't find executable rake for rake-0.8.7 (Gem::Exception) from C:/Users/Luis/Projects/oss/oci/rubyinstaller/sandbox/ruby19_mingw/bin/rake:19:in
'
So the issue is not that, but that the gem_prelude is not loaded properly?
This happens with trunk and with 1.9.2 branch.
=end
Updated by rogerdpack (Roger Pack) almost 15 years ago
- Status changed from Open to Rejected
=begin
Good catch. It only occurs after doing a "gem install rake"
and it appears that it is also reproducible on XP, once you do that.
=end
Updated by rogerdpack (Roger Pack) almost 15 years ago
- Status changed from Rejected to Open
=begin
oops rejected in error...
=end
Updated by luislavena (Luis Lavena) almost 15 years ago
=begin
On Tue, Aug 10, 2010 at 5:04 PM, Roger Pack [email protected] wrote:
Good catch. It only occurs after doing a "gem install rake"
and it appears that it is also reproducible on XP, once you do that.Also able to reproduce it in Linux:
$ ./ruby -S rake -T
/home/rdp/installs/ruby_trunk_installed/lib/ruby/1.9.1/rubygems.rb:340:in
bin_path': can't find executable rake for rake-0.8.7 (Gem::Exception) from /home/rdp/installs/ruby-1.9.1-p376_installed/bin/rake:19:in
'
$ ./ruby -v
ruby 1.9.3dev (2010-08-10 trunk 28955) [i686-linux]
Installing the gem outside Ruby (using GEM_HOME and GEM_PATH) do not
generate the issue.
C:\Users\Luis\Projects\oss\oci\rubyinstaller>gem env paths
C:/Users/Luis/.gem/ruby/1.9.1;C:/Users/Luis/Tools/Ruby/ruby-1.9.2-p0-i386-mingw32/lib/ruby/gems/1.9.1
C:\Users\Luis\Projects\oss\oci\rubyinstaller>gem list rake -d
*** LOCAL GEMS ***
rake (0.8.7)
Author:
Installed at:
C:/Users/Luis/Tools/Ruby/ruby-1.9.2-p0-i386-mingw32/lib/ruby/gems/1.9.1
This rake is bundled with Ruby
C:\Users\Luis\Projects\oss\oci\rubyinstaller>rake --version
C:/Users/Luis/Tools/Ruby/ruby-1.9.2-p0-i386-mingw32/lib/ruby/1.9.1/rubygems.rb:340:in
bin_path': can't find executable rake for rake-0.8.7 (Gem::Exception) from C:/Users/Luis/.gem/ruby/x86-mingw32/1.9.1/bin/rake:19:in
'
C:\Users\Luis\Projects\oss\oci\rubyinstaller>set GEM
GEM_HOME=C:\Users\Luis.gem\ruby\x86-mingw32\1.9.1
GEM_PATH=C:\Users\Luis.gem\ruby\x86-mingw32\1.9.1
C:\Users\Luis\Projects\oss\oci\rubyinstaller>gem env paths
C:/Users/Luis/.gem/ruby/x86-mingw32/1.9.1
C:\Users\Luis\Projects\oss\oci\rubyinstaller>gem list rake -d
*** LOCAL GEMS ***
rake (0.8.7)
Author: Jim Weirich
Rubyforge: http://rubyforge.org/projects/rake
Homepage: http://rake.rubyforge.org
Installed at: C:/Users/Luis/.gem/ruby/x86-mingw32/1.9.1
Ruby based make-like utility.
C:\Users\Luis\Projects\oss\oci\rubyinstaller>rake --version
rake, version 0.8.7
--
Luis Lavena
AREA 17¶
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
=end
Updated by rogerdpack (Roger Pack) almost 15 years ago
=begin
Appears that deleting your installation's "rake.gemspec" file is enough.
http://gist.github.com/519744
Perhaps rubygems doesn't know how to remove the previous version .gemspec file, since it lacks any version info?
-r
=end
Updated by luislavena (Luis Lavena) almost 15 years ago
=begin
Hello,
Bosko (one of RubyInstaller contributors) shed some light on this issue in our group:
Going to quote it here:
"Problem is that during installation in rbinstall.rb line
516 default .gemspec files are created for rake, rdoc and minitest. These
files are saved by default in lib/ruby/gems/1.9.1/specifications. If
everything is left by default other gems will be installed there too (that's
why this problem can occur on Linux too). Since these specifications do not
contain default_executable and executables sections invoking them results in
error. If rvm is used on Linux error will not occur because gems will be
installed in different folder and load path is set to that folder and
rake.gemspec and rake-0.8.7.gemspec will not both be loaded. Later one has
correct sections for default_executable and executables thus everything will
work correctly.
Unfortunately in our RubyInstaller both of these files will be in the same
directory and that's the reason why reinstalling rake doesn't help unless
rake.gemspec is deleted since this specification is loaded after
rake-0.8.7.gemspec and overrides it. I'm not sure what would be the best
approach to fix this problem. Either not to bundle rake with Ruby or to
create correct .gemspec file. We can also set different installation
directory too like rvm does."
I believe this is important to be fixed before 1.9.2 release gets out. Not all the users will be using RVM to manage their Ruby installations.
=end
Updated by shyouhei (Shyouhei Urabe) almost 15 years ago
- Status changed from Open to Assigned
- Assignee set to nobu (Nobuyoshi Nakada)
- Priority changed from Normal to 3
=begin
=end
Updated by luislavena (Luis Lavena) over 14 years ago
=begin
Hello,
A patch has been provided in #3805:
http://redmine.ruby-lang.org/issues/show/3805
Also has been applied in r29200
=end
Updated by rogerdpack (Roger Pack) over 14 years ago
- Status changed from Assigned to Closed
=begin
thanks seems fixed now (along with all its other dupes...)
=end