1

When within a rails project directory (e.g. the directory where I created the app) bundle install returns:

ERROR: Gem bundler is not installed, run `gem install bundler` first.

From within the same rails project directory, issuing rails server returns: Rails is not currently installed on this system. To get the latest version, simply type:

  $ sudo gem install rails

You can then rerun your "rails" command.

Clearly (below) Rails is installed, Bundle is present, however, I've messed something up so that neither is recognized.

Any ideas where I went wrong?

OSX Lion 10.7.3

Xcode Installed

GCC-10.7-v2.pkg Installed

Ruby -v returns:
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]

rvm -v returns:
rvm 1.10.3

rails -v returns:
Rails 3.2.2

env $PATH returns:
env: /Users/username/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/bin:/Users/username/.rvm/gems/ruby-1.9.3-p125@global/bin:/Users/username/.rvm/rubies/ruby-1.9.3-p125/bin:/Users/username/.rvm/bin:/usr/local/sbin:/Applications/SenchaSDKTools-2.0.0-Beta/jsbuilder:/Applications/SenchaSDKTools-2.0.0-Beta/command:/Applications/SenchaSDKTools-2.0.0-Beta:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/local/git/bin/: No such file or directory

RubyGems Environment:
- RUBYGEMS VERSION: 1.8.17
- RUBY VERSION: 1.9.3 (2012-02-16 patchlevel 125) [x86_64-darwin11.3.0]
- INSTALLATION DIRECTORY: /Users/username/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd
- RUBY EXECUTABLE: /Users/username/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
- EXECUTABLE DIRECTORY: /Users/username/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/bin
- RUBYGEMS PLATFORMS:
  - ruby
  - x86_64-darwin-11
- GEM PATHS:
   - /Users/username/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd
   - /Users/username/.rvm/gems/ruby-1.9.3-p125@global
- GEM CONFIGURATION:
   - :update_sources => true
   - :verbose => true
   - :benchmark => false
   - :backtrace => false
   - :bulk_threshold => 1000
   - "gem" => "--no-ri --no-rdoc"
- REMOTE SOURCES:
   - http://rubygems.org/
JohnGalt
  • 2,731
  • 1
  • 19
  • 28
  • 1
    'bundle install' is two words. – muffinista Mar 12 '12 at 00:03
  • Let me get this right: `rails server` returns "Rails is not currently installed" but `rails -v` returns "Rails 3.2.2"? Can you double check that, typing them in consecutively on a command line? – Ben Lee Mar 12 '12 at 00:03
  • Ben Lee if I'm in a created rails project, rails -v, rails server, etc. says it is not installed, outside of that directory rails -v returns 3.2.2 (of course rails server doesn't work outside a project directory) – JohnGalt Mar 12 '12 at 00:07
  • do you have multiple version of ruby installed in your computer? – erogol Mar 12 '12 at 00:22
  • I believe I have both 1.8.7 and 1.9.3. I installed RVM which I believe is linked to 1.9.3. – JohnGalt Mar 12 '12 at 01:42
  • If you've got RVM, make sure it's installed properly and in your `.bash_profile` or `.bashrc` or `.zshrc` or what-have-you. Worst-case scenario, blow away your `~/.rvm` folder and install it again. – Ben Kreeger Mar 13 '12 at 02:58
  • Ben, I have [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" in my .bash_profile, is there anything else I should've included? – JohnGalt Mar 13 '12 at 03:24
  • RESOLVED: It turns out I wasn't pointing rvm to the correct place (gemset I think)...after I typed $rvm use ruby-1.9.3-p125@rails3tutorial2ndEd all was resolved. Found the reference at [link] (http://stackoverflow.com/questions/7788946/rails-keeps-telling-me-that-its-not-currently-installed) – JohnGalt Mar 13 '12 at 03:38

1 Answers1

1

ruby -v should not give 1.8.7 rvm use 1.9.3 --default after that it should work just fine

Alisher Ulugbekov
  • 1,759
  • 2
  • 11
  • 8