4

Redhat で実行されている Ruby On Rails アプリを参照すると、このエラー メッセージが表示されます。パスの問題が疑われますが、それを理解できません。同様の問題についてこのフォーラムで提案された解決策を読みましたが、それらのほとんどは MacOS 用です。

バンドラーをインストールしようとしましたが、動作しているように見えましたが、問題はまだあります

user1@company.com [~]# gem install bundler
Successfully installed bundler-1.2.1
1 gem installed
Installing ri documentation for bundler-1.2.1...
Installing RDoc documentation for bundler-1.2.1...
user1@company.com [~]# 
user1@company.com [~]# bundle install
ERROR: Gem bundler is not installed, run `gem install bundler` first.
user1@company.com [~]#

私の環境はこちら

user1@company.com [~]# gem list -d bundler

*** REMOTE GEMS ***

bundler (1.2.1)
Authors: André Arko, Terence Lee, Carl Lerche, Yehuda Katz
Rubyforge: http://rubyforge.org/projects/bundler
Homepage: http://gembundler.com

The best way to manage your application's dependencies
<snip>

user1@company.com [~]# gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.24
- RUBY VERSION: 1.9.3 (2012-10-12 patchlevel 286) [x86_64-linux]
- INSTALLATION DIRECTORY: /home3/user1/ruby/gems
- RUBY EXECUTABLE: /home3/user1/.rvm/rubies/ruby-1.9.3-p286/bin/ruby
- EXECUTABLE DIRECTORY: /home3/user1/ruby/gems/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
 - /home3/user1/ruby/gems
- GEM CONFIGURATION:
 - :update_sources => true
 - :verbose => true
 - :benchmark => false
 - :backtrace => false
 - :bulk_threshold => 1000
 - "gem" => "--remote --gen-rdoc --run-tests"
 - "gemhome" => "/home3/user1/ruby/gems"
 - "gempath" => []
 - "rdoc" => "--inline-source --line-numbers"
- REMOTE SOURCES:
 - http://rubygems.org/
user1@company.com [~]#

user1@company.com [~]# whereis ruby
ruby: /bin/ruby /bin/ruby.orig /usr/bin/ruby /usr/bin/ruby.orig /sbin/ruby /sbin/ruby.orig /usr/sbin/ruby /usr/sbin/ruby.orig /lib64/ruby /usr/lib64/ruby /usr/local/bin/ruby /usr/local/bin/ruby.orig /usr/share/man/man1/ruby.1.gz
user1@company.com [~]# whereis rake
rake: /bin/rake /usr/bin/rake /sbin/rake /usr/sbin/rake /usr/local/bin/rake

user1@company.com [~]# which ruby
/home3/user1/.rvm/rubies/ruby-1.9.3-p286/bin/ruby

user1@company.com [~]# which gem

user1@company.com [~]# which rake
/home3/user1/.rvm/rubies/ruby-1.9.3-p286/bin/rake
user1@company.com [~]#

user1@company.com [~]# rvm list

rvm rubies

ruby-1.9.3-p286 [ x86_64 ]

# => - current
# =* - current && default  
#  * - default

user1@company.com [~]# 

user1@company.com [~]# echo $PATH
/usr/local/jdk/bin:/home3/user1/.rvm/gems/ruby-1.9.3-p286/bin:/home3/user1/.rvm/gems/ruby-1.9.3-p286@global/bin:/home3/user1/.rvm/rubies/ruby-1.9.3-p286/bin:/home3/user1/.rvm/bin:/home3/user1/perl5/bin:/usr/lib64/qt-3.3/bin:/ramdisk/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11R6/bin:/home3/user1/ruby/gems/bin:/home3/user1/ruby/gems:/home3/user1/bin
user1@company.com [~]# echo $GEM_PATH
/home3/user1/ruby/gems:/home3/user1/.rvm/gems/ruby-1.9.3-p286:/home3/user1/.rvm/rubies/ruby-1.9.3-p286/bin/ruby:/home3/user1/.rvm/src/rubygems-1.8.24/setup.rb:/usr/lib64/ruby/gems/1.8:/home3/user1/ruby/gems:/home3/user1/.rvm/gems/ruby-1.9.3-p286:/home3/user1/.rvm/rubies/ruby-1.9.3-p286/bin/ruby:/home3/user1/.rvm/src/rubygems-1.8.24/setup.rb/ruby/gems
user1@company.com [~]# echo $HOME
/home3/user1
user1@company.com [~]# echo $GEM_HOME
/home3/user1/ruby/gems:/home3/user1/.rvm/gems/ruby-1.9.3-p286:/home3/user1/.rvm/rubies/ruby-1.9.3-p286/bin/ruby:/home3/user1/.rvm/src/rubygems-1.8.24/setup.rb
user1@company.com [~]#
4

1 に答える 1

0

PATHこれは、 のインストール場所の前にある場所にスタブ バイナリがあることが原因である可能性が最も高いです/home3/user1/ruby/gems/bin

の前に移動すると/home3/user1/ruby/gems/bin(またはのgem env出力があれば) 、動作するはずです。EXECUTABLE DIRECTORYPATH

于 2015-02-27T05:23:06.063 に答える