views:

133

answers:

2

I'm hosting on a vps,ubuntu 10.04, rails3, ruby and mysql installed correctly by following tutorials. If I run 'bundle check' or 'bundle install' I get the error '-bash: bundle: command not found'. From 'gem list --local' I see 'bundler (1.0.2, 1.0.0)' is installed.

I don't know what's going wrong...

gem environment returns:

 RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.8.7 (2010-04-19 patchlevel 253) [i686-linux]
  - INSTALLATION DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /opt/ruby-enterprise-1.8.7-2010.02/bin/ruby
  - EXECUTABLE DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.02/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-linux
  - GEM PATHS:
     - /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8
     - /root/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

and echo $path returns:

/opt/myruby/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/bin/gem:/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/:/root/.gem/ruby/1.8

and which gem returns:

/usr/bin/gem

locate bundle returns:

/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/
A: 

I think bundle executable is on :

/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/bin and it's not in your $PATH

shingara
+2  A: 

You need to add the ruby gem executable directory to your path

export PATH=$PATH:/opt/ruby-enterprise-1.8.7-2010.02/bin

Beerlington