views:

70

answers:

1

Hello guys,

I am running Ruby 1.9.2. I have rake 0.8.7 installed. However running rake inside a Rails application gives me the following:

(in /usr/home/users/dimitar/Rails/spek)
Could not find activesupport-3.0.1 in any of the sources
Try running `bundle install`.

So I go ahead and run bundle install again and everything looks good:

Fetching source index for http://rubygems.org/
Using rake (0.8.7) 
Using abstract (1.0.0) 
Using activesupport (3.0.1) 
Using builder (2.1.2) 
Using i18n (0.4.1) 
Using activemodel (3.0.1) 
Using erubis (2.6.6) 
Using rack (1.2.1) 
Using rack-mount (0.6.13) 
Using rack-test (0.5.6) 
Using tzinfo (0.3.23) 
Using actionpack (3.0.1) 
Using mime-types (1.16) 
Using polyglot (0.3.1) 
Using treetop (1.4.8) 
Using mail (2.2.7) 
Using actionmailer (3.0.1) 
Using arel (1.0.1) 
Using activerecord (3.0.1) 
Using activeresource (3.0.1) 
Using bundler (1.0.3) 
Using thor (0.14.3) 
Using railties (3.0.1) 
Using rails (3.0.1) 
Using sqlite3-ruby (1.3.1) 
Your bundle is updated! Use `bundle show [gemname]` to see where a bundled gem is installed.

But rake still gives me the same error message. Any suggestions?


Actually the problem seems to come from the config/boot.rb file:

# Set up gems listed in the Gemfile.                                                                                                                               
gemfile = File.expand_path('../../Gemfile', __FILE__)
begin
  ENV['BUNDLE_GEMFILE'] = gemfile
  require 'bundler'
  Bundler.setup
rescue Bundler::GemNotFound => e
  STDERR.puts e.message
  STDERR.puts "Try running `bundle install`."
  exit!
end if File.exist?(gemfile)
A: 

Do you have multiple Ruby interpreters installed (maybe via rvm or some other method)? If so, are you sure that the right one is active?

Things to look at:

which ruby
which rake
ruby -e 'puts $:' # To show the LOAD_PATH for gems
Telemachus
I do have Ruby 1.8.7 installed, but it's not being used at all. Everything seems to be okay. If I specify rails 3.0.0 in the Gemfile, all works fine.
daLizard
@daLizard Based on your follow-up and this, it sounds like a Bundler-specific issue. You might try checking its documentation further http://gembundler.com/
Telemachus
@Telemachus I am checking the documentation right now. Also emailed the discussion list. Yep, seems like Bundler problem to me. Although might be FreeBSD specific, since it works on MacOS with the same versions of the gems.
daLizard