Fixing,.. bundle: command not found error
When you are working with rails/ bundler you might have had this error message
bundle: command not found
But, you are pretty sure that bundler is installed in your machine… So what would be the reason !?, Ok, you may already have the answer, the answer is even though you have bundler installed, its not in your system PATH
So how to add bundler to your system path, heres how
1 - First you have to see find the ruby gem executable path to your path directory,
to do this run the following command
gem environment
Ex: (here is mine)
RubyGems Environment:
- RUBYGEMS VERSION: 1.7.2
- RUBY VERSION: 1.8.7 (2011-12-28 patchlevel 357) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/sameera/.rvm/gems/ruby-1.8.7-p357
- RUBY EXECUTABLE: /home/sameera/.rvm/rubies/ruby-1.8.7-p357/bin/ruby
- EXECUTABLE DIRECTORY: /home/sameera/.rvm/gems/ruby-1.8.7-p357/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/sameera/.rvm/gems/ruby-1.8.7-p357
- /home/sameera/.rvm/gems/ruby-1.8.7-p357@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
export PATH=$PATH:<ruby gem executable path>
try bundle , (and it should work :D)