我在rails项目中运行bundle install时遇到错误。
sahil@debian:~/workspace/blog$ bundle install
/usr/bin/env: ruby: No such file or directory
红宝石
sahil@debian:~/workspace/blog$ ruby -v
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86__64-linux]
sahil@debian:~/workspace/blog$ which ruby
/home/sahil/.rvm/bin/ruby
通过rvm安装ruby时收到以下错误。
Error running 'env GEM_PATH=/home/sahil/.rvm/gems/ruby-2.0.0-p0:/home/sahil/.rvm/gems/ruby-2.0.0-p0@global:/home/sahil/.rvm/gems/ruby-2.0.0-p0:/home/sahil/.rvm/gems/ruby-2.0.0-p0@global GEM_HOME=/home/sahil/.rvm/gems/ruby-2.0.0-p0 /home/sahil/.rvm/rubies/ruby-2.0.0-p0/bin/ruby -d /home/sahil/.rvm/src/rubygems-2.0.3/setup.rb --verbose',
please read /home/sahil/.rvm/log/ruby-2.0.0-p0/rubygems.install.log
rvm env
sahil@debian:~$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.3
- RUBY VERSION: 2.0.0 (2013-02-24 patchlevel 0) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/sahil/.rvm/gems/ruby-2.0.0-p0
- RUBY EXECUTABLE: /home/sahil/.rvm/rubies/ruby-2.0.0-p0/bin/ruby
- EXECUTABLE DIRECTORY: /home/sahil/.rvm/gems/ruby-2.0.0-p0/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/sahil/.rvm/gems/ruby-2.0.0-p0
- /home/sahil/.rvm/gems/ruby-2.0.0-p0@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => t
rvm env看起来不错。不确定我错过了什么。
答案 0 :(得分:0)
请按照以下基本步骤使用RVM(从https://stackoverflow.com/a/15570121/497756复制):
rvm install 2.0.0
rvm use 2.0.0 --default # The default arg is needed only first time
gem install bundler
bundle install
另一个答案显示了更多细节:https://stackoverflow.com/a/10591301/497756